diff options
Diffstat (limited to 'jstests/sharding/mongos_validate_writes.js')
-rw-r--r-- | jstests/sharding/mongos_validate_writes.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/jstests/sharding/mongos_validate_writes.js b/jstests/sharding/mongos_validate_writes.js index 66b71aa12c3..f920992799c 100644 --- a/jstests/sharding/mongos_validate_writes.js +++ b/jstests/sharding/mongos_validate_writes.js @@ -37,7 +37,7 @@ coll.ensureIndex({b: 1}); st.shardColl(coll, {b: 1}, {b: 0}, {b: 1}, coll.getDB(), true); // Make sure that we can successfully insert, even though we have stale state -assert.writeOK(staleCollA.insert({b: "b"})); +assert.commandWorked(staleCollA.insert({b: "b"})); // Make sure we unsuccessfully insert with old info assert.writeError(staleCollB.insert({a: "a"})); @@ -48,7 +48,7 @@ coll.ensureIndex({c: 1}); st.shardColl(coll, {c: 1}, {c: 0}, {c: 1}, coll.getDB(), true); // Make sure we can successfully upsert, even though we have stale state -assert.writeOK(staleCollA.update({c: "c"}, {c: "c"}, true)); +assert.commandWorked(staleCollA.update({c: "c"}, {c: "c"}, true)); // Make sure we unsuccessfully upsert with old info assert.writeError(staleCollB.update({b: "b"}, {b: "b"}, true)); @@ -59,9 +59,9 @@ coll.ensureIndex({d: 1}); st.shardColl(coll, {d: 1}, {d: 0}, {d: 1}, coll.getDB(), true); // Make sure we can successfully update, even though we have stale state -assert.writeOK(coll.insert({d: "d"})); +assert.commandWorked(coll.insert({d: "d"})); -assert.writeOK(staleCollA.update({d: "d"}, {$set: {x: "x"}}, false, false)); +assert.commandWorked(staleCollA.update({d: "d"}, {$set: {x: "x"}}, false, false)); assert.eq(staleCollA.findOne().x, "x"); // Make sure we unsuccessfully update with old info @@ -76,9 +76,9 @@ st.ensurePrimaryShard(coll.getDB().getName(), st.shard0.shardName); st.shardColl(coll, {e: 1}, {e: 0}, {e: 1}, coll.getDB(), true); // Make sure we can successfully remove, even though we have stale state -assert.writeOK(coll.insert({e: "e"})); +assert.commandWorked(coll.insert({e: "e"})); -assert.writeOK(staleCollA.remove({e: "e"}, true)); +assert.commandWorked(staleCollA.remove({e: "e"}, true)); assert.eq(null, staleCollA.findOne()); // Make sure we unsuccessfully remove with old info |