diff options
author | Tim Burke <tim.burke@gmail.com> | 2017-12-18 17:14:36 -0800 |
---|---|---|
committer | Tim Burke <tim.burke@gmail.com> | 2017-12-18 17:18:46 -0800 |
commit | cd11289ba18a916b05dba30956631d9631fb130f (patch) | |
tree | 2534473d5ab67a0545d502d9ea14a63c39c177de | |
parent | 8dcef649757dc029d2fc7d776b9e7f8926f2bbd5 (diff) | |
download | swift-cd11289ba18a916b05dba30956631d9631fb130f.tar.gz |
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
-rw-r--r-- | test/functional/test_object.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/test_object.py b/test/functional/test_object.py index 2ee99a752..a428b95b2 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 |