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
This commit is contained in:
Tim Burke 2017-05-02 10:53:49 -07:00
parent 5cb1303d5b
commit fa83dd1ab4

View File

@ -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',