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
This commit is contained in:
Clay Gerrard 2015-06-30 17:24:13 -07:00
parent 170313d7db
commit d4d7c0e1b1

View File

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