summaryrefslogtreecommitdiff
path: root/jstests/core
diff options
context:
space:
mode:
authorA. Jesse Jiryu Davis <jesse@mongodb.com>2020-12-15 13:41:29 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-12-15 20:17:40 +0000
commit0c132588e9907c7b123f986a61c3a43cd087381f (patch)
treea83d514dff0689f97e7d9db7b503912767ec9cc9 /jstests/core
parentc425bdcf1862d642460211fcf450664233a9e6d0 (diff)
downloadmongo-0c132588e9907c7b123f986a61c3a43cd087381f.tar.gz
SERVER-52545 Define listIndexes with IDL
Diffstat (limited to 'jstests/core')
-rw-r--r--jstests/core/geo_s2index.js5
-rw-r--r--jstests/core/list_indexes_invalidation.js10
2 files changed, 12 insertions, 3 deletions
diff --git a/jstests/core/geo_s2index.js b/jstests/core/geo_s2index.js
index 328b43d04ab..2afd3053cea 100644
--- a/jstests/core/geo_s2index.js
+++ b/jstests/core/geo_s2index.js
@@ -143,6 +143,9 @@ res = t.createIndex({loc: "2dsphere"}, {finestIndexedLevel: 30, coarsestIndexedL
assert.commandWorked(res);
// Ensure the index actually works at a basic level
assert.neq(null, t.findOne({loc: {$geoNear: {$geometry: {type: 'Point', coordinates: [0, 0]}}}}));
+let created = t.getIndexes().filter((idx) => idx.hasOwnProperty("2dsphereIndexVersion"))[0];
+assert.eq(created.finestIndexedLevel, 30, created);
+assert.eq(created.coarsestIndexedLevel, 0, created);
t.drop();
t.save({loc: [0, 0]});
@@ -169,4 +172,4 @@ t.insert({
}
});
res = t.createIndex({loc: "2dsphere"});
-assert.commandWorked(res); \ No newline at end of file
+assert.commandWorked(res);
diff --git a/jstests/core/list_indexes_invalidation.js b/jstests/core/list_indexes_invalidation.js
index 85ab71eec42..74afd3327bd 100644
--- a/jstests/core/list_indexes_invalidation.js
+++ b/jstests/core/list_indexes_invalidation.js
@@ -1,6 +1,11 @@
// Cannot implicitly shard accessed collections because renameCollection command not supported
// on sharded collections.
-// @tags: [assumes_unsharded_collection, requires_non_retryable_commands, requires_fastcount]
+// @tags: [
+// assumes_unsharded_collection,
+// requires_non_retryable_commands,
+// requires_fastcount,
+// requires_getmore
+// ]
(function() {
'use strict';
@@ -16,7 +21,7 @@ function testIndexInvalidation(isRename) {
// Get the first two indexes.
let cmd = {listIndexes: collName};
- Object.extend(cmd, {batchSize: 2});
+ Object.extend(cmd, {cursor: {batchSize: 2}});
let res = db.runCommand(cmd);
assert.commandWorked(res, 'could not run ' + tojson(cmd));
printjson(res);
@@ -25,6 +30,7 @@ function testIndexInvalidation(isRename) {
let cursor = new DBCommandCursor(db, res);
let errMsg = 'expected more data from command ' + tojson(cmd) + ', with result ' + tojson(res);
assert(cursor.hasNext(), errMsg);
+ assert(res.cursor.id !== NumberLong("0"), errMsg);
if (isRename) {
assert.commandWorked(coll.renameCollection(collNameRenamed));
} else {