diff options
author | James Wahlin <james.wahlin@mongodb.com> | 2019-08-14 13:52:59 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-08-14 13:52:59 +0000 |
commit | 39c3a5d77b976e131d37476f2e7255d6058f5093 (patch) | |
tree | 01cc28719f215b17196ec913f475cd8efda9b37d /jstests/sharding/auth.js | |
parent | 69d0dd1dc4fb1f78d21c47aa5dd82aa9077b69eb (diff) | |
download | mongo-39c3a5d77b976e131d37476f2e7255d6058f5093.tar.gz |
SERVER-42773 Replace uses of the assert.writeOK() Javascript assertion with assert.commandWorked()
Diffstat (limited to 'jstests/sharding/auth.js')
-rw-r--r-- | jstests/sharding/auth.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/sharding/auth.js b/jstests/sharding/auth.js index 61b5c273315..5131c512271 100644 --- a/jstests/sharding/auth.js +++ b/jstests/sharding/auth.js @@ -67,7 +67,7 @@ s.getDB(adminUser.db) login(adminUser); // Set the chunk size, disable the secondary throttle (so the test doesn't run so slow) -assert.writeOK( +assert.commandWorked( s.getDB("config").settings.update({_id: "balancer"}, {$set: {"_secondaryThrottle": false, "_waitForDelete": true}}, {upsert: true})); @@ -151,7 +151,7 @@ login(testUser); assert.eq(s.getDB("test").foo.findOne(), null); print("insert try 2"); -assert.writeOK(s.getDB("test").foo.insert({x: 1})); +assert.commandWorked(s.getDB("test").foo.insert({x: 1})); assert.eq(1, s.getDB("test").foo.find().itcount(), tojson(result)); logout(testUser); @@ -181,7 +181,7 @@ var bulk = s.getDB("test").foo.initializeUnorderedBulkOp(); for (i = 0; i < num; i++) { bulk.insert({_id: i, x: i, abc: "defg", date: new Date(), str: "all the talk on the market"}); } -assert.writeOK(bulk.execute()); +assert.commandWorked(bulk.execute()); s.startBalancer(60000); |