From cd11289ba18a916b05dba30956631d9631fb130f Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Mon, 18 Dec 2017 17:14:36 -0800 Subject: [PATCH] Add a small sleep when trying to predict X-Timestamp The existing test works fine if you're running the tests on an all-in-one, but is pretty brittle if you aren't running them on the one and only proxy-server they're hitting. Add 0.1s sleep to allow *some* clock slippage between client and server. Change-Id: Iacd08e9f703d08d0092b5e8eb53fe287ba1d1596 --- test/functional/test_object.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/functional/test_object.py b/test/functional/test_object.py index 2ee99a7527..a428b95b28 100644 --- a/test/functional/test_object.py +++ b/test/functional/test_object.py @@ -330,8 +330,10 @@ class TestObject(unittest2.TestCase): 'Content-Length': '0'}) return check_response(conn) ts_before = time.time() + time.sleep(0.05) resp = retry(put) body = resp.read() + time.sleep(0.05) ts_after = time.time() if resp.status == 400: # shunt_inbound_x_timestamp must be false @@ -361,8 +363,10 @@ class TestObject(unittest2.TestCase): 'Content-Length': '0'}) return check_response(conn) ts_before = time.time() + time.sleep(0.05) resp = retry(put) body = resp.read() + time.sleep(0.05) ts_after = time.time() if resp.status == 400: # shunt_inbound_x_timestamp must be false