From: Ali Masarwa Date: Thu, 18 Jul 2024 12:24:05 +0000 (+0300) Subject: RGW|BN: fix lifecycle test and http server issue X-Git-Tag: v20.0.0~1365^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F58747%2Fhead;p=ceph.git RGW|BN: fix lifecycle test and http server issue Signed-off-by: Ali Masarwa --- diff --git a/src/test/rgw/bucket_notification/test_bn.py b/src/test/rgw/bucket_notification/test_bn.py index 54a2a0e98ee..bdb302511f4 100644 --- a/src/test/rgw/bucket_notification/test_bn.py +++ b/src/test/rgw/bucket_notification/test_bn.py @@ -1791,11 +1791,16 @@ def lifecycle(endpoint_type, conn, number_of_objects, topic_events, create_threa # start lifecycle processing admin(['lc', 'process'], get_config_cluster()) - print('wait for 20s for the lifecycle...') - time.sleep(20) - print('wait for sometime for the messages...') - + print('polling on bucket object to check if lifecycle deleted them...') + max_loops = 100 no_keys = list(bucket.list()) + while len(no_keys) > 0 and max_loops > 0: + print('waiting 5 secs to check if lifecycle kicked in') + time.sleep(5) + no_keys = list(bucket.list()) + max_loops = max_loops - 1 + + assert len(no_keys) == 0, "lifecycle didn't delete the objects after 500 seconds" wait_for_queue_to_drain(topic_name, http_port=port) assert_equal(len(no_keys), 0) event_keys = []