From 4633fe4c124e7b44d2d490053363a785c066e905 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Wed, 15 Feb 2012 12:45:31 -0800 Subject: [PATCH] fix atomic_write test, don't resuse same key handle for read and write --- s3tests/functional/test_s3.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/s3tests/functional/test_s3.py b/s3tests/functional/test_s3.py index 1255099..514885f 100644 --- a/s3tests/functional/test_s3.py +++ b/s3tests/functional/test_s3.py @@ -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 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)