summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/indexbg1.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/noPassthrough/indexbg1.js
parent69d0dd1dc4fb1f78d21c47aa5dd82aa9077b69eb (diff)
downloadmongo-39c3a5d77b976e131d37476f2e7255d6058f5093.tar.gz
SERVER-42773 Replace uses of the assert.writeOK() Javascript assertion with assert.commandWorked()
Diffstat (limited to 'jstests/noPassthrough/indexbg1.js')
-rw-r--r--jstests/noPassthrough/indexbg1.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/jstests/noPassthrough/indexbg1.js b/jstests/noPassthrough/indexbg1.js
index 1b06b881e30..c2bdf180be3 100644
--- a/jstests/noPassthrough/indexbg1.js
+++ b/jstests/noPassthrough/indexbg1.js
@@ -53,7 +53,7 @@ while (1) { // if indexing finishes before we can run checks, try indexing w/ m
for (var i = 0; i < size; ++i) {
bulk.insert({i: i});
}
- assert.writeOK(bulk.execute());
+ assert.commandWorked(bulk.execute());
assert.eq(size, t.count());
bgIndexBuildPid = doParallel(fullName + ".ensureIndex( {i:1}, {background:true} )");
@@ -76,14 +76,14 @@ while (1) { // if indexing finishes before we can run checks, try indexing w/ m
assert(ex.executionStats.totalKeysExamined < 1000,
"took too long to find 100: " + tojson(ex));
- assert.writeOK(t.remove({i: 40}, true)); // table scan
- assert.writeOK(t.update({i: 10}, {i: -10})); // should scan 10
+ assert.commandWorked(t.remove({i: 40}, true)); // table scan
+ assert.commandWorked(t.update({i: 10}, {i: -10})); // should scan 10
var id = t.find().hint({$natural: -1}).next()._id;
- assert.writeOK(t.update({_id: id}, {i: -2}));
- assert.writeOK(t.save({i: -50}));
- assert.writeOK(t.save({i: size + 2}));
+ assert.commandWorked(t.update({_id: id}, {i: -2}));
+ assert.commandWorked(t.save({i: -50}));
+ assert.commandWorked(t.save({i: size + 2}));
assert.eq(size + 1, t.count());