summaryrefslogtreecommitdiff
path: root/jstests/core/txns/repeatable_reads_in_transaction.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/txns/repeatable_reads_in_transaction.js')
-rw-r--r--jstests/core/txns/repeatable_reads_in_transaction.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/jstests/core/txns/repeatable_reads_in_transaction.js b/jstests/core/txns/repeatable_reads_in_transaction.js
index 3286b6e72cb..870a1d58e6f 100644
--- a/jstests/core/txns/repeatable_reads_in_transaction.js
+++ b/jstests/core/txns/repeatable_reads_in_transaction.js
@@ -26,7 +26,8 @@ const session2Db = session2.getDatabase(dbName);
const session2Coll = session2Db.getCollection(collName);
jsTest.log("Prepopulate the collection.");
-assert.writeOK(testColl.insert([{_id: 0}, {_id: 1}, {_id: 2}], {writeConcern: {w: "majority"}}));
+assert.commandWorked(
+ testColl.insert([{_id: 0}, {_id: 1}, {_id: 2}], {writeConcern: {w: "majority"}}));
// Create a constant array of documents we expect to be returned during a read-only transaction.
// The value should not change since external changes should not be visible within this
@@ -61,7 +62,7 @@ assert.sameMembers(expectedDocs, sessionColl.find().toArray());
jsTestLog(
"Writes that occur outside of a transaction should not be visible to a read only transaction.");
-assert.writeOK(testColl.insert({_id: 4}, {writeConcern: {w: "majority"}}));
+assert.commandWorked(testColl.insert({_id: 4}, {writeConcern: {w: "majority"}}));
assert.sameMembers(expectedDocs, sessionColl.find().toArray());