summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/read_majority_reads.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/noPassthrough/read_majority_reads.js')
-rw-r--r--jstests/noPassthrough/read_majority_reads.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/jstests/noPassthrough/read_majority_reads.js b/jstests/noPassthrough/read_majority_reads.js
index f76363a0b28..065db43f426 100644
--- a/jstests/noPassthrough/read_majority_reads.js
+++ b/jstests/noPassthrough/read_majority_reads.js
@@ -129,15 +129,15 @@ function runTests(coll, mongodConnection) {
var getCursor = cursorTestCases[testName];
// Setup initial state.
- assert.writeOK(coll.remove({}));
- assert.writeOK(coll.save({_id: 1, state: 'before', point: [0, 0]}));
+ assert.commandWorked(coll.remove({}));
+ assert.commandWorked(coll.save({_id: 1, state: 'before', point: [0, 0]}));
setCommittedSnapshot(makeSnapshot());
// Check initial conditions.
assert.eq(getCursor(coll).next().state, 'before');
// Change state without making it committed.
- assert.writeOK(coll.save({_id: 1, state: 'after', point: [0, 0]}));
+ assert.commandWorked(coll.save({_id: 1, state: 'after', point: [0, 0]}));
// Cursor still sees old state.
assert.eq(getCursor(coll).next().state, 'before');
@@ -163,15 +163,15 @@ function runTests(coll, mongodConnection) {
var expectedAfter = nonCursorTestCases[testName].expectedAfter;
// Setup initial state.
- assert.writeOK(coll.remove({}));
- assert.writeOK(coll.save({_id: 1, state: 'before', point: [0, 0]}));
+ assert.commandWorked(coll.remove({}));
+ assert.commandWorked(coll.save({_id: 1, state: 'before', point: [0, 0]}));
setCommittedSnapshot(makeSnapshot());
// Check initial conditions.
assert.eq(getResult(coll), expectedBefore);
// Change state without making it committed.
- assert.writeOK(coll.save({_id: 1, state: 'after', point: [0, 0]}));
+ assert.commandWorked(coll.save({_id: 1, state: 'after', point: [0, 0]}));
// Cursor still sees old state.
assert.eq(getResult(coll), expectedBefore);