summaryrefslogtreecommitdiff
path: root/jstests/sharding/query_sharded.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/sharding/query_sharded.js
parent69d0dd1dc4fb1f78d21c47aa5dd82aa9077b69eb (diff)
downloadmongo-39c3a5d77b976e131d37476f2e7255d6058f5093.tar.gz
SERVER-42773 Replace uses of the assert.writeOK() Javascript assertion with assert.commandWorked()
Diffstat (limited to 'jstests/sharding/query_sharded.js')
-rw-r--r--jstests/sharding/query_sharded.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/jstests/sharding/query_sharded.js b/jstests/sharding/query_sharded.js
index 92ef5f19678..b79cff55cb1 100644
--- a/jstests/sharding/query_sharded.js
+++ b/jstests/sharding/query_sharded.js
@@ -11,7 +11,7 @@ var coll = mongos.getCollection("foo.bar");
//
// Ensure we can't use exhaust option through mongos
coll.remove({});
-assert.writeOK(coll.insert({a: 'b'}));
+assert.commandWorked(coll.insert({a: 'b'}));
var query = coll.find({});
assert.neq(null, query.next());
query = coll.find({}).addOption(DBQuery.Option.exhaust);
@@ -23,7 +23,7 @@ assert.throws(function() {
//
// Ensure we can't trick mongos by inserting exhaust option on a command through mongos
coll.remove({});
-assert.writeOK(coll.insert({a: 'b'}));
+assert.commandWorked(coll.insert({a: 'b'}));
var cmdColl = mongos.getCollection(coll.getDB().toString() + ".$cmd");
var cmdQuery = cmdColl.find({ping: 1}).limit(1);
assert.commandWorked(cmdQuery.next());