summaryrefslogtreecommitdiff
path: root/jstests/sharding/sharding_rs2.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/sharding_rs2.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/sharding_rs2.js')
-rw-r--r--jstests/sharding/sharding_rs2.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/sharding/sharding_rs2.js b/jstests/sharding/sharding_rs2.js
index 2b35cf695e4..d2a6f0e2b74 100644
--- a/jstests/sharding/sharding_rs2.js
+++ b/jstests/sharding/sharding_rs2.js
@@ -129,7 +129,7 @@ for (var i = 0; i < 100; i++) {
continue;
bulk.insert({x: i});
}
-assert.writeOK(bulk.execute({w: 3}));
+assert.commandWorked(bulk.execute({w: 3}));
// Counts pass the options of the connection - which is slaveOk'd, so we need to wait for
// replication for this and future tests to pass
@@ -225,7 +225,7 @@ rs.getSecondaries().forEach(function(secondary) {
// Modify data only on the primary replica of the primary shard.
// { x: 60 } goes to the shard of "rs", which is the primary shard.
-assert.writeOK(ts.insert({primaryOnly: true, x: 60}));
+assert.commandWorked(ts.insert({primaryOnly: true, x: 60}));
// Read from secondary through mongos, the doc is not there due to replication delay or fsync.
// But we can guarantee not to read from primary.
assert.eq(0, ts.find({primaryOnly: true, x: 60}).itcount());
@@ -234,7 +234,7 @@ rs.getSecondaries().forEach(function(secondary) {
secondary.getDB("test").fsyncUnlock();
});
// Clean up the data
-assert.writeOK(ts.remove({primaryOnly: true, x: 60}, {writeConcern: {w: 3}}));
+assert.commandWorked(ts.remove({primaryOnly: true, x: 60}, {writeConcern: {w: 3}}));
for (var i = 0; i < 10; i++) {
m = new Mongo(s.s.name);