summaryrefslogtreecommitdiff
path: root/jstests/parallel
diff options
context:
space:
mode:
authorArun Banala <arun.banala@mongodb.com>2020-11-12 17:48:52 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-11-12 18:15:38 +0000
commit7c196029e8529d8d217a4c9314d8a4e6069a91d2 (patch)
treedcac2d4dda9015804fbf538cffd4a15d9c02cd39 /jstests/parallel
parentccd024d9fb5c0587e33a3a3321e7f9a0430d0190 (diff)
downloadmongo-7c196029e8529d8d217a4c9314d8a4e6069a91d2.tar.gz
Revert "SERVER-50442 Remove ensureIndex shell function This commit also replaces all the usages of ensureIndex() with createIndex() in JS tests and JS shell"
This reverts commit e69c967ff8b53634770438dfe9a5c7d13548351b.
Diffstat (limited to 'jstests/parallel')
-rw-r--r--jstests/parallel/insert.js2
-rw-r--r--jstests/parallel/manyclients.js2
-rw-r--r--jstests/parallel/update_serializability1.js4
-rw-r--r--jstests/parallel/update_serializability2.js4
4 files changed, 6 insertions, 6 deletions
diff --git a/jstests/parallel/insert.js b/jstests/parallel/insert.js
index d28eb89e220..e2dee8053d9 100644
--- a/jstests/parallel/insert.js
+++ b/jstests/parallel/insert.js
@@ -3,7 +3,7 @@ load('jstests/libs/parallelTester.js');
f = db.jstests_parallel_insert;
f.drop();
-f.createIndex({who: 1});
+f.ensureIndex({who: 1});
Random.setRandomSeed();
diff --git a/jstests/parallel/manyclients.js b/jstests/parallel/manyclients.js
index fc6dce056a8..ca31f333635 100644
--- a/jstests/parallel/manyclients.js
+++ b/jstests/parallel/manyclients.js
@@ -3,7 +3,7 @@ load('jstests/libs/parallelTester.js');
f = db.jstests_parallel_manyclients;
f.drop();
-f.createIndex({who: 1});
+f.ensureIndex({who: 1});
Random.setRandomSeed();
diff --git a/jstests/parallel/update_serializability1.js b/jstests/parallel/update_serializability1.js
index e57b51ae721..6fc41204c3c 100644
--- a/jstests/parallel/update_serializability1.js
+++ b/jstests/parallel/update_serializability1.js
@@ -10,8 +10,8 @@ for (var i = 0; i < N; i++) {
}
bulk.execute();
-t.createIndex({a: 1});
-t.createIndex({b: 1});
+t.ensureIndex({a: 1});
+t.ensureIndex({b: 1});
s1 = startParallelShell("db.update_serializability1.update( { a : { $gte : 0 } }, { $set : { b : " +
(N + 1) + ", x : 2 } }, false, true );");
diff --git a/jstests/parallel/update_serializability2.js b/jstests/parallel/update_serializability2.js
index 16fd4ad3394..84b27049e53 100644
--- a/jstests/parallel/update_serializability2.js
+++ b/jstests/parallel/update_serializability2.js
@@ -11,8 +11,8 @@ for (var i = 0; i < N; i++) {
}
bulk.execute();
-t.createIndex({a: 1});
-t.createIndex({b: 1});
+t.ensureIndex({a: 1});
+t.ensureIndex({b: 1});
var s1 = startParallelShell(
"db.update_serializability1.update( { a : { $gte : 0 } }, { $set : { x : 2 } }, false, true );");