summaryrefslogtreecommitdiff
path: root/jstests/sharding/lookup_stale_mongos.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/sharding/lookup_stale_mongos.js')
-rw-r--r--jstests/sharding/lookup_stale_mongos.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/jstests/sharding/lookup_stale_mongos.js b/jstests/sharding/lookup_stale_mongos.js
index f1e71280a18..2c74af07b28 100644
--- a/jstests/sharding/lookup_stale_mongos.js
+++ b/jstests/sharding/lookup_stale_mongos.js
@@ -40,16 +40,16 @@ const expectedResults = [
assert.commandWorked(mongos0DB.adminCommand({enableSharding: mongos0DB.getName()}));
st.ensurePrimaryShard(mongos0DB.getName(), st.shard0.shardName);
-assert.writeOK(mongos0LocalColl.insert({_id: 0, a: 1}));
-assert.writeOK(mongos0LocalColl.insert({_id: 1, a: null}));
+assert.commandWorked(mongos0LocalColl.insert({_id: 0, a: 1}));
+assert.commandWorked(mongos0LocalColl.insert({_id: 1, a: null}));
-assert.writeOK(mongos0ForeignColl.insert({_id: 0, b: 1}));
-assert.writeOK(mongos0ForeignColl.insert({_id: 1, b: null}));
+assert.commandWorked(mongos0ForeignColl.insert({_id: 0, b: 1}));
+assert.commandWorked(mongos0ForeignColl.insert({_id: 1, b: null}));
// Send writes through mongos1 such that it's aware of the collections and believes they are
// unsharded.
-assert.writeOK(mongos1LocalColl.insert({_id: 2}));
-assert.writeOK(mongos1ForeignColl.insert({_id: 2}));
+assert.commandWorked(mongos1LocalColl.insert({_id: 2}));
+assert.commandWorked(mongos1ForeignColl.insert({_id: 2}));
//
// Test unsharded local and sharded foreign collections, with mongos unaware that the foreign
@@ -106,9 +106,9 @@ assert.eq(mongos1LocalColl.aggregate(pipeline).toArray(), expectedResults);
// Recreate the foreign collection as unsharded through mongos0.
mongos0ForeignColl.drop();
-assert.writeOK(mongos0ForeignColl.insert({_id: 0, b: 1}));
-assert.writeOK(mongos0ForeignColl.insert({_id: 1, b: null}));
-assert.writeOK(mongos0ForeignColl.insert({_id: 2}));
+assert.commandWorked(mongos0ForeignColl.insert({_id: 0, b: 1}));
+assert.commandWorked(mongos0ForeignColl.insert({_id: 1, b: null}));
+assert.commandWorked(mongos0ForeignColl.insert({_id: 2}));
// Issue a $lookup through mongos1, which is unaware that the foreign collection is now
// unsharded.
@@ -121,9 +121,9 @@ assert.eq(mongos1LocalColl.aggregate(pipeline).toArray(), expectedResults);
// Recreate the local collection as unsharded through mongos0.
mongos0LocalColl.drop();
-assert.writeOK(mongos0LocalColl.insert({_id: 0, a: 1}));
-assert.writeOK(mongos0LocalColl.insert({_id: 1, a: null}));
-assert.writeOK(mongos0LocalColl.insert({_id: 2}));
+assert.commandWorked(mongos0LocalColl.insert({_id: 0, a: 1}));
+assert.commandWorked(mongos0LocalColl.insert({_id: 1, a: null}));
+assert.commandWorked(mongos0LocalColl.insert({_id: 2}));
// Issue a $lookup through mongos1, which is unaware that the local collection is now
// unsharded.