summaryrefslogtreecommitdiff
path: root/jstests/concurrency
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2021-11-17 22:41:50 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-11-17 23:53:28 +0000
commitf79b7b5a95adee4a126690bc93ca3fa69efb2c2b (patch)
treeadd37b6b8cc0e648f3b8cba166561ee9b51cab0e /jstests/concurrency
parent9f15b2b1eeb356f4e3d0c6e06302941ec685cc0a (diff)
downloadmongo-f79b7b5a95adee4a126690bc93ca3fa69efb2c2b.tar.gz
SERVER-61517 clean up fsm_workloads/update_check_index.js
Diffstat (limited to 'jstests/concurrency')
-rw-r--r--jstests/concurrency/fsm_workloads/update_check_index.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/jstests/concurrency/fsm_workloads/update_check_index.js b/jstests/concurrency/fsm_workloads/update_check_index.js
index 71b8d32dfae..f960f2abf83 100644
--- a/jstests/concurrency/fsm_workloads/update_check_index.js
+++ b/jstests/concurrency/fsm_workloads/update_check_index.js
@@ -20,13 +20,17 @@ var $config = (function() {
var transitions = {multiUpdate: {multiUpdate: 1.0}};
function setup(db, collName, cluster) {
- assertAlways.commandWorked(db[collName].createIndex({a: 1}));
- assertAlways.commandWorked(db[collName].createIndex({b: 1}));
- assertAlways.commandWorked(db[collName].createIndex({c: 1}));
+ assertAlways.commandWorked(db[collName].createIndexes([
+ {a: 1},
+ {b: 1},
+ {c: 1},
+ ]));
+ let docs = [];
for (var i = 0; i < 10; i++) {
- assertAlways.commandWorked(db[collName].insert({a: 1, b: 1, c: 1}));
+ docs.push({a: 1, b: 1, c: 1});
}
+ assertAlways.commandWorked(db[collName].insert(docs));
}
// Asserts that the number of index entries for all three entries matches the number of docs