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/noPassthrough/yield_during_writes.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/noPassthrough/yield_during_writes.js')
-rw-r--r-- | jstests/noPassthrough/yield_during_writes.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/noPassthrough/yield_during_writes.js b/jstests/noPassthrough/yield_during_writes.js index d1e6845b58e..ab283382c5a 100644 --- a/jstests/noPassthrough/yield_during_writes.js +++ b/jstests/noPassthrough/yield_during_writes.js @@ -27,16 +27,16 @@ const coll = mongod.getDB('test').yield_during_writes; coll.drop(); for (let i = 0; i < nDocsToInsert; i++) { - assert.writeOK(coll.insert({_id: i})); + assert.commandWorked(coll.insert({_id: i})); } // A multi-update doing a collection scan should yield about nDocsToInsert / worksPerYield // times. -assert.writeOK(coll.update({}, {$inc: {counter: 1}}, {multi: true})); +assert.commandWorked(coll.update({}, {$inc: {counter: 1}}, {multi: true})); assert.gt(countOpYields(coll, 'update'), (nDocsToInsert / worksPerYield) - 2); // Likewise, a multi-remove should also yield approximately every worksPerYield documents. -assert.writeOK(coll.remove({}, {multi: true})); +assert.commandWorked(coll.remove({}, {multi: true})); assert.gt(countOpYields(coll, 'remove'), (nDocsToInsert / worksPerYield) - 2); MongoRunner.stopMongod(mongod); |