Skip to content

Commit

Permalink
ducktape: Change condition for upload check
Browse files Browse the repository at this point in the history
The condition for the test checks if the number of segments uploaded is
exactly equal to one minus the local segment count. Since the max
upload interval is set we can end up uploading all segments to the
cloud (as seen in CI failures). This change adjusts the success
condition to include the case where all segments are uploaded.
  • Loading branch information
abhijat committed Jun 14, 2023
1 parent 02bba07 commit bf8e2ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/rptest/tests/retention_policy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def cloud_log_segment_count() -> int:
f"Waiting for {local_seg_count - 1} segments to be uploaded to the cloud"
)
# Wait for everything to be uploaded to the cloud.
wait_until(lambda: cloud_log_segment_count() == local_seg_count - 1,
wait_until(lambda: cloud_log_segment_count() >= local_seg_count - 1,
timeout_sec=10,
backoff_sec=2,
err_msg=f"Segments not uploaded")
Expand Down

0 comments on commit bf8e2ed

Please sign in to comment.