summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Tuckman <ted.tuckman@mongodb.com>2020-02-12 08:45:05 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-08-14 19:00:24 +0000
commit11981cbf54adad061d688b44689e65ea4e814c86 (patch)
tree31526bbcb789b5e57bd2df05b8426feec99d05e0
parent65864da5eb9885dae432fa8a1b9b46f31be04b07 (diff)
downloadmongo-11981cbf54adad061d688b44689e65ea4e814c86.tar.gz
SERVER-45233 Include the empty array in the comparison with index test
(cherry picked from commit 0630338fb592b3283240ba72ac4b0c7111f6193c) (cherry picked from commit 0d8d980ae814f5b9f55cd9bea4d4bef84a9dca6a)
-rw-r--r--jstests/core/array_index_and_nonIndex_consistent.js9
1 files changed, 3 insertions, 6 deletions
diff --git a/jstests/core/array_index_and_nonIndex_consistent.js b/jstests/core/array_index_and_nonIndex_consistent.js
index 05ddf4ccf0c..1ec6b5d992a 100644
--- a/jstests/core/array_index_and_nonIndex_consistent.js
+++ b/jstests/core/array_index_and_nonIndex_consistent.js
@@ -11,11 +11,11 @@
indexColl.drop();
nonIndexedColl.drop();
- db.indexColl.createIndex({val: 1});
+ assert.commandWorked(indexColl.createIndex({val: 1}));
+ assert.commandWorked(db.runCommand({create: nonIndexedColl.getName()}));
const collList = [indexColl, nonIndexedColl];
-
collList.forEach(function(collObj) {
- assert.commandWorked(collObj.insert([
+ const writeResult = assert.writeOK(collObj.insert([
{val: [1, 2]},
{val: [3, 4]},
{val: [3, 1]},
@@ -52,9 +52,6 @@
MinKey, [MaxKey], [MaxKey, 2], [MaxKey, 4], MaxKey, [],
];
- let failedLT = [];
- let failedGT = [];
-
queryList.forEach(function(q) {
const queryLT = {val: {"$lt": q}};
const queryGT = {val: {"$gt": q}};