summaryrefslogtreecommitdiff
path: root/jstests/sharding/resume_change_stream_on_subset_of_shards.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/sharding/resume_change_stream_on_subset_of_shards.js')
-rw-r--r--jstests/sharding/resume_change_stream_on_subset_of_shards.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/sharding/resume_change_stream_on_subset_of_shards.js b/jstests/sharding/resume_change_stream_on_subset_of_shards.js
index b914a310e82..6176ead3664 100644
--- a/jstests/sharding/resume_change_stream_on_subset_of_shards.js
+++ b/jstests/sharding/resume_change_stream_on_subset_of_shards.js
@@ -40,13 +40,13 @@ assert.commandWorked(mongosDB.adminCommand(
let changeStream = mongosColl.watch();
// ... then do one write to produce a resume token...
-assert.writeOK(mongosColl.insert({_id: -2}));
+assert.commandWorked(mongosColl.insert({_id: -2}));
assert.soon(() => changeStream.hasNext());
const resumeToken = changeStream.next()._id;
// ... followed by one write to each chunk for testing purposes, i.e. shards 0 and 1.
-assert.writeOK(mongosColl.insert({_id: -1}));
-assert.writeOK(mongosColl.insert({_id: 1}));
+assert.commandWorked(mongosColl.insert({_id: -1}));
+assert.commandWorked(mongosColl.insert({_id: 1}));
// The change stream should see all the inserts after establishing cursors on all shards.
for (let nextId of [-1, 1]) {
@@ -58,7 +58,7 @@ for (let nextId of [-1, 1]) {
}
// Insert another document after storing the resume token.
-assert.writeOK(mongosColl.insert({_id: 2}));
+assert.commandWorked(mongosColl.insert({_id: 2}));
// Resume the change stream and verify that it correctly sees the next insert. This is meant
// to test resuming a change stream when not all shards are aware that the collection exists,