summaryrefslogtreecommitdiff
path: root/jstests/sharding/multi_mongos2.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/multi_mongos2.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/multi_mongos2.js')
-rw-r--r--jstests/sharding/multi_mongos2.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/jstests/sharding/multi_mongos2.js b/jstests/sharding/multi_mongos2.js
index fad2106aad5..796ef9e3a7e 100644
--- a/jstests/sharding/multi_mongos2.js
+++ b/jstests/sharding/multi_mongos2.js
@@ -12,7 +12,7 @@ assert.commandWorked(st.s0.adminCommand({shardcollection: "test.foo", key: {num:
st.configRS.awaitLastOpCommitted();
// "test.existing" - unsharded
-assert.writeOK(st.s0.getDB('test').existing.insert({_id: 1}));
+assert.commandWorked(st.s0.getDB('test').existing.insert({_id: 1}));
assert.eq(1, st.s0.getDB('test').existing.count({_id: 1}));
assert.eq(1, st.s1.getDB('test').existing.count({_id: 1}));
@@ -27,7 +27,7 @@ assert.eq(1, st.s0.getDB('test').existing.count({_id: 1})); // SERVER-2828
assert.eq(1, st.s1.getDB('test').existing.count({_id: 1}));
// Test stats
-assert.writeOK(st.s0.getDB('test').existing2.insert({_id: 1}));
+assert.commandWorked(st.s0.getDB('test').existing2.insert({_id: 1}));
assert.eq(1, st.s0.getDB('test').existing2.count({_id: 1}));
assert.eq(1, st.s1.getDB('test').existing2.count({_id: 1}));
@@ -43,10 +43,10 @@ assert.commandWorked(st.s1.adminCommand({split: "test.existing2", middle: {_id:
}
// Test admin commands
-assert.writeOK(st.s0.getDB('test').existing3.insert({_id: 1}));
+assert.commandWorked(st.s0.getDB('test').existing3.insert({_id: 1}));
assert.eq(1, st.s0.getDB('test').existing3.count({_id: 1}));
assert.eq(1, st.s1.getDB('test').existing3.count({_id: 1}));
-assert.writeOK(st.s1.adminCommand({shardcollection: "test.existing3", key: {_id: 1}}));
+assert.commandWorked(st.s1.adminCommand({shardcollection: "test.existing3", key: {_id: 1}}));
st.configRS.awaitLastOpCommitted();
assert.commandWorked(st.s1.adminCommand({split: "test.existing3", middle: {_id: 5}}));