mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-25 03:47:22 +00:00
fix atomic_write test, don't resuse same key handle for read and write
This commit is contained in:
parent
256577fc87
commit
4633fe4c12
1 changed files with 3 additions and 1 deletions
|
@ -2961,10 +2961,12 @@ def _test_atomic_write(file_size):
|
|||
# verify A's
|
||||
_verify_atomic_key_data(key, file_size, 'A')
|
||||
|
||||
read_key = bucket.get_key(objname)
|
||||
|
||||
# create <file_size> file of B's
|
||||
# but try to verify the file before we finish writing all the B's
|
||||
fp_b = FakeWriteFile(file_size, 'B',
|
||||
lambda: _verify_atomic_key_data(key, file_size)
|
||||
lambda: _verify_atomic_key_data(read_key, file_size)
|
||||
)
|
||||
key.set_contents_from_file(fp_b)
|
||||
|
||||
|
|
Loading…
Reference in a new issue