From d64681cba0b79be49bbb9fa6ce7c06fae4a412a0 Mon Sep 17 00:00:00 2001 From: Pragadeeswaran Sathyanarayanan Date: Wed, 2 Mar 2022 19:37:52 +0530 Subject: [PATCH] Fix versioning tests failures due multiple removal of object Signed-off-by: Pragadeeswaran Sathyanarayanan --- s3tests/functional/test_s3.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/s3tests/functional/test_s3.py b/s3tests/functional/test_s3.py index 37716c3..5616bbb 100644 --- a/s3tests/functional/test_s3.py +++ b/s3tests/functional/test_s3.py @@ -6854,8 +6854,9 @@ def _do_remove_versions(bucket, objname, remove_start_idx, idx_inc, head_rm_rati for j in xrange(total): r += head_rm_ratio - if r >= 1: - r %= 1 + + # Head object can be removed only once. + if r == 1: remove_obj_head(bucket, objname, k, c) else: remove_obj_version(bucket, k, c, idx)