From d4d7c0e1b11af8f20f965f410901a56e1f8ee69e Mon Sep 17 00:00:00 2001 From: Clay Gerrard Date: Tue, 30 Jun 2015 17:24:13 -0700 Subject: [PATCH] Fix race in test_server.TestObjectController.test_PUT_ssync_multi_frag If the test ran across a one second boundary it would fail because while the timestamp normalization was doing some rounding it was making no attempt to reuse the same timestamp on subsequent requests. Change-Id: Ic560032bcfacd6f0d10cfc0f4f10e5d6c2bc8dd5 --- test/unit/obj/test_server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/unit/obj/test_server.py b/test/unit/obj/test_server.py index d0a6865a4c..410797c4dd 100755 --- a/test/unit/obj/test_server.py +++ b/test/unit/obj/test_server.py @@ -1267,8 +1267,9 @@ class TestObjectController(unittest.TestCase): object_server.http_connect = old_http_connect def test_PUT_ssync_multi_frag(self): + timestamp = utils.Timestamp(time()).internal + def put_with_index(expected_rsp, frag_index, node_index=None): - timestamp = utils.Timestamp(int(time())).internal data_file_tail = '#%d.data' % frag_index headers = {'X-Timestamp': timestamp, 'Content-Length': '6',