Skip to content

Commit 1d8c739

Browse files
committed
PYTHON-1691 Fix transaction test runner to read the latest data from the primary
1 parent c200c2c commit 1d8c739

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/test_transactions.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,9 +512,11 @@ def kill_all_sessions():
512512
# Assert final state is expected.
513513
expected_c = test['outcome'].get('collection')
514514
if expected_c is not None:
515-
# Read from the primary to ensure causal consistency.
515+
# Read from the primary with local read concern to ensure causal
516+
# consistency.
516517
primary_coll = collection.with_options(
517-
read_preference=ReadPreference.PRIMARY)
518+
read_preference=ReadPreference.PRIMARY,
519+
read_concern=ReadConcern('local'))
518520
self.assertEqual(list(primary_coll.find()), expected_c['data'])
519521

520522
return run_scenario

0 commit comments

Comments
 (0)