diff --git a/s3tests/readwrite.py b/s3tests/readwrite.py index f0122c8..a06210b 100644 --- a/s3tests/readwrite.py +++ b/s3tests/readwrite.py @@ -16,9 +16,9 @@ import common NANOSECOND = int(1e9) -def reader(bucket, worker_id, file_names, queue): +def reader(bucket, worker_id, file_names, queue, rand): while True: - objname = random.choice(file_names) + objname = rand.choice(file_names) key = bucket.new_key(objname) fp = realistic.FileVerifier() @@ -64,10 +64,10 @@ def reader(bucket, worker_id, file_names, queue): ) queue.put(result) -def writer(bucket, worker_id, file_names, files, queue): +def writer(bucket, worker_id, file_names, files, queue, rand): while True: fp = next(files) - objname = random.choice(file_names) + objname = rand.choice(file_names) key = bucket.new_key(objname) result = dict( @@ -109,8 +109,6 @@ def parse_options(): parser = optparse.OptionParser( usage='%prog [OPTS]