Skip to content

Commit 168602c

Browse files
author
Xin Dong
committed
Get a new collection for each iteration
1 parent 51fa862 commit 168602c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/correctness/document-correctness.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,8 +530,6 @@ def _run_operation_(op1, op2):
530530

531531

532532
def test_forever(ns):
533-
(client1, client2, collection1, collection2) = get_clients_and_collections(ns)
534-
535533
seed = ns['seed']
536534
bgf_enabled = ns['buggify']
537535
num_iter = ns['num_iter']
@@ -541,6 +539,7 @@ def test_forever(ns):
541539

542540
gen.global_prng = random.Random(seed)
543541

542+
(client1, client2, instance) = get_clients(ns['1'], ns['2'], ns)
544543
# this assumes that the database name we use for testing is "test"
545544
client = client1 if "doclayer" == ns['1'] else (client2 if "doclayer" == ns['2'] else None)
546545
if client is not None:
@@ -551,6 +550,11 @@ def test_forever(ns):
551550
if num_iter != 0 and jj > num_iter:
552551
break
553552

553+
dbName = 'test-' + instance + '-' + str(gen.global_prng.randint(100000,100000000))
554+
collName = 'correctness-' + instance + '-' + str(gen.global_prng.randint(100000,100000000))
555+
collection1 = client1[dbName][collName]
556+
collection2 = client2[dbName][collName]
557+
554558
print '========================================================'
555559
print 'ID : ' + str(os.getpid()) + ' iteration : ' + str(jj)
556560
print '========================================================'

0 commit comments

Comments
 (0)