summaryrefslogtreecommitdiff
path: root/jstests/noPassthroughWithMongod
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2018-11-28 21:41:30 -0500
committerBenety Goh <benety@mongodb.com>2018-11-28 21:41:55 -0500
commit03e13f90426a82a97cbb0f926385e09904519259 (patch)
treefea2c3374f1bf70527b8bd82e6f32b60621b6910 /jstests/noPassthroughWithMongod
parenta20abe09f605a8d6d57611a241f1d38952933748 (diff)
downloadmongo-03e13f90426a82a97cbb0f926385e09904519259.tar.gz
SERVER-37729 IndexBuilder updates CurOp using createIndexes format
Diffstat (limited to 'jstests/noPassthroughWithMongod')
-rw-r--r--jstests/noPassthroughWithMongod/indexbg_drop.js21
1 files changed, 4 insertions, 17 deletions
diff --git a/jstests/noPassthroughWithMongod/indexbg_drop.js b/jstests/noPassthroughWithMongod/indexbg_drop.js
index 7281f171466..738119f578c 100644
--- a/jstests/noPassthroughWithMongod/indexbg_drop.js
+++ b/jstests/noPassthroughWithMongod/indexbg_drop.js
@@ -1,7 +1,5 @@
-// TODO: SERVER-13215 move test back to replSets suite.
-
/**
- * TODO: SERVER-13204
+ * TODO: SERVER-38301
* This tests inserts a huge number of documents, initiates a background index build
* and tries to perform another task in parallel while the background index task is
* active. The problem is that this is timing dependent and the current test setup
@@ -11,6 +9,8 @@
// Index drop race
+load('jstests/noPassthrough/libs/index_build.js');
+
var dbname = 'dropbgindex';
var collection = 'jstests_feh';
var size = 500000;
@@ -59,20 +59,7 @@ masterDB.getCollection(collection).ensureIndex({b: 1});
masterDB.getCollection(collection).ensureIndex({i: 1}, {background: true});
// make sure the index build has started on secondary
-assert.soon(function() {
- var curOp = secondDB.currentOp();
- printjson(curOp);
- for (var i = 0; i < curOp.inprog.length; i++) {
- try {
- if (curOp.inprog[i].command.background) {
- return true;
- }
- } catch (e) {
- // catchem if you can
- }
- }
- return false;
-}, "waiting for secondary bg index build", 20000, 10);
+IndexBuildTest.waitForIndexBuildToStart(secondDB);
jsTest.log("dropping index");
masterDB.runCommand({dropIndexes: collection, index: "*"});