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:
parent
170313d7db
commit
d4d7c0e1b1
@ -1267,8 +1267,9 @@ class TestObjectController(unittest.TestCase):
|
|||||||
object_server.http_connect = old_http_connect
|
object_server.http_connect = old_http_connect
|
||||||
|
|
||||||
def test_PUT_ssync_multi_frag(self):
|
def test_PUT_ssync_multi_frag(self):
|
||||||
|
timestamp = utils.Timestamp(time()).internal
|
||||||
|
|
||||||
def put_with_index(expected_rsp, frag_index, node_index=None):
|
def put_with_index(expected_rsp, frag_index, node_index=None):
|
||||||
timestamp = utils.Timestamp(int(time())).internal
|
|
||||||
data_file_tail = '#%d.data' % frag_index
|
data_file_tail = '#%d.data' % frag_index
|
||||||
headers = {'X-Timestamp': timestamp,
|
headers = {'X-Timestamp': timestamp,
|
||||||
'Content-Length': '6',
|
'Content-Length': '6',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user