summaryrefslogtreecommitdiff
path: root/jstests/core/awaitdata_getmore_cmd.js
diff options
context:
space:
mode:
authorJames Wahlin <james.wahlin@mongodb.com>2019-08-14 13:52:59 +0000
committerevergreen <evergreen@mongodb.com>2019-08-14 13:52:59 +0000
commit39c3a5d77b976e131d37476f2e7255d6058f5093 (patch)
tree01cc28719f215b17196ec913f475cd8efda9b37d /jstests/core/awaitdata_getmore_cmd.js
parent69d0dd1dc4fb1f78d21c47aa5dd82aa9077b69eb (diff)
downloadmongo-39c3a5d77b976e131d37476f2e7255d6058f5093.tar.gz
SERVER-42773 Replace uses of the assert.writeOK() Javascript assertion with assert.commandWorked()
Diffstat (limited to 'jstests/core/awaitdata_getmore_cmd.js')
-rw-r--r--jstests/core/awaitdata_getmore_cmd.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/jstests/core/awaitdata_getmore_cmd.js b/jstests/core/awaitdata_getmore_cmd.js
index eb1fb194a32..d142615fa94 100644
--- a/jstests/core/awaitdata_getmore_cmd.js
+++ b/jstests/core/awaitdata_getmore_cmd.js
@@ -24,7 +24,7 @@ var coll = db[collName];
// Create a non-capped collection with 10 documents.
coll.drop();
for (var i = 0; i < 10; i++) {
- assert.writeOK(coll.insert({a: i}));
+ assert.commandWorked(coll.insert({a: i}));
}
// Find with tailable flag set should fail for a non-capped collection.
@@ -44,7 +44,7 @@ assert.eq(cmdRes.cursor.firstBatch.length, 0);
// Create a capped collection with 10 documents.
assert.commandWorked(db.createCollection(collName, {capped: true, size: 2048}));
for (var i = 0; i < 10; i++) {
- assert.writeOK(coll.insert({a: i}));
+ assert.commandWorked(coll.insert({a: i}));
}
// GetMore should succeed if query has awaitData but no maxTimeMS is supplied.
@@ -161,7 +161,7 @@ assert.eq(cmdRes.cursor.firstBatch.length, 0);
// the user if a document was inserted, but it did not match the filter.
let insertshell = startParallelShell(() => {
// Signal to the original shell that the parallel shell has successfully started.
- assert.writeOK(db.await_data.insert({_id: "signal parent shell"}));
+ assert.commandWorked(db.await_data.insert({_id: "signal parent shell"}));
// Wait for the parent shell to start watching for the next document.
assert.soon(() => db.currentOp({
@@ -171,7 +171,7 @@ let insertshell = startParallelShell(() => {
() => tojson(db.currentOp().inprog));
// Now write a non-matching document to the collection.
- assert.writeOK(db.await_data.insert({_id: "no match", x: 0}));
+ assert.commandWorked(db.await_data.insert({_id: "no match", x: 0}));
// Make sure the getMore has not ended after a while.
sleep(2000);
@@ -182,7 +182,7 @@ let insertshell = startParallelShell(() => {
tojson(db.currentOp().inprog));
// Now write a matching document to wake it up.
- assert.writeOK(db.await_data.insert({_id: "match", x: 1}));
+ assert.commandWorked(db.await_data.insert({_id: "match", x: 1}));
});
// Wait until we receive confirmation that the parallel shell has started.