From bf8e2eda2ce007d10a6cc4b4794e34c219a3fb2b Mon Sep 17 00:00:00 2001 From: Abhijat Malviya Date: Wed, 14 Jun 2023 21:02:47 +0530 Subject: [PATCH] ducktape: Change condition for upload check 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. --- tests/rptest/tests/retention_policy_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/rptest/tests/retention_policy_test.py b/tests/rptest/tests/retention_policy_test.py index 1d896b837fb1..59463ac9fe27 100644 --- a/tests/rptest/tests/retention_policy_test.py +++ b/tests/rptest/tests/retention_policy_test.py @@ -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")