summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@mongodb.com>2014-04-18 15:28:21 -0400
committerAndy Schwerin <schwerin@mongodb.com>2014-04-18 17:33:29 -0400
commitd4b1e9e2e5097ff777b69543183088fa1fbb0129 (patch)
tree28ba33328ca06f37fcde403c087709e17336d4a4 /jstests
parent7303d9b39af069dd530ca59233dae2831585c7af (diff)
downloadmongo-d4b1e9e2e5097ff777b69543183088fa1fbb0129.tar.gz
SERVER-13620 Make indexbg_drop.js expose the bug.
Diffstat (limited to 'jstests')
-rw-r--r--jstests/noPassthroughWithMongod/indexbg_drop.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/jstests/noPassthroughWithMongod/indexbg_drop.js b/jstests/noPassthroughWithMongod/indexbg_drop.js
index a389cbdcb66..7241b0d4c3e 100644
--- a/jstests/noPassthroughWithMongod/indexbg_drop.js
+++ b/jstests/noPassthroughWithMongod/indexbg_drop.js
@@ -47,12 +47,15 @@ for( i = 0; i < size; ++i ) {
}
jsTest.log("Starting background indexing for test of: " + tojson(dc));
+// Add another index to be sure the drop command works.
+masterDB.getCollection(collection).ensureIndex({b:1});
+
masterDB.getCollection(collection).ensureIndex( {i:1}, {background:true} );
-assert.eq(2, masterDB.system.indexes.count( {ns:dbname + "." + collection}, {background:true} ) );
+assert.eq(3, masterDB.system.indexes.count( {ns:dbname + "." + collection}, {background:true} ) );
// Wait for the secondary to get the index entry
assert.soon(
- function() { return 2 == secondDB.system.indexes.count( {ns:dbname + "." + collection} ); },
+ function() { return 3 == secondDB.system.indexes.count( {ns:dbname + "." + collection} ); },
"index not created on secondary (prior to drop)", 120000, 50 );
jsTest.log("Index created and system.indexes entry exists on secondary");