From fa83dd1ab44e963ce17b7c3842714bb9135d9400 Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Tue, 2 May 2017 10:53:49 -0700 Subject: [PATCH] Fix intermittent failure in test_POST_but_expired It was rare (I saw it once in 8000 runs), but occassionally the clock would roll over and cause us to PUT an X-Delete-At that matched the current time. Change-Id: I10d3b9fcbefff3c415a92fa284a1ea1eda458581 Closes-Bug: #1597520 --- test/unit/obj/test_server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/obj/test_server.py b/test/unit/obj/test_server.py index e33c0b314d..bcae104b27 100644 --- a/test/unit/obj/test_server.py +++ b/test/unit/obj/test_server.py @@ -5874,7 +5874,7 @@ class TestObjectController(unittest.TestCase): resp = req.get_response(self.object_controller) self.assertEqual(resp.status_int, 202) - delete_at_timestamp = int(time() + 1) + delete_at_timestamp = int(time() + 2) delete_at_container = str( delete_at_timestamp / self.object_controller.expiring_objects_container_divisor * @@ -5892,7 +5892,7 @@ class TestObjectController(unittest.TestCase): orig_time = object_server.time.time try: - t = time() + 2 + t = time() + 3 object_server.time.time = lambda: t req = Request.blank( '/sda1/p/a/c/o',