summaryrefslogtreecommitdiff
path: root/jstests/noPassthroughWithMongod
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2019-02-21 08:44:22 -0500
committerEric Milkie <milkie@10gen.com>2019-02-21 12:51:02 -0500
commitf69dc2d3637dd1fb8de8d11c2a03289a5c31fceb (patch)
tree3f29268d517e1d48e0fd65db2dc5501e2444766e /jstests/noPassthroughWithMongod
parent4c35dd7daebfd54efa3ba45d96dd3b80bbdfdbab (diff)
downloadmongo-f69dc2d3637dd1fb8de8d11c2a03289a5c31fceb.tar.gz
SERVER-39723 Revert "SERVER-25175 listIndexes command only includes ready indexes"
This reverts commit e013b606016ead1c82ed7c09cbe3c558d5aaa3b2.
Diffstat (limited to 'jstests/noPassthroughWithMongod')
-rw-r--r--jstests/noPassthroughWithMongod/indexbg_drop.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/jstests/noPassthroughWithMongod/indexbg_drop.js b/jstests/noPassthroughWithMongod/indexbg_drop.js
index 244d0cca9c7..1f4e1c1be64 100644
--- a/jstests/noPassthroughWithMongod/indexbg_drop.js
+++ b/jstests/noPassthroughWithMongod/indexbg_drop.js
@@ -56,6 +56,14 @@ jsTest.log("Starting background indexing for test of: " + tojson(dc));
masterDB.getCollection(collection).ensureIndex({b: 1});
masterDB.getCollection(collection).ensureIndex({i: 1}, {background: true});
+assert.eq(3, masterDB.getCollection(collection).getIndexes().length);
+
+// Wait for the secondary to get the index entry
+assert.soon(function() {
+ return 3 == secondDB.getCollection(collection).getIndexes().length;
+}, "index not created on secondary (prior to drop)", 240000);
+
+jsTest.log("Index created and index entry exists on secondary");
// make sure the index build has started on secondary
assert.soon(function() {