summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/timestamp_index_builds.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/noPassthrough/timestamp_index_builds.js')
-rw-r--r--jstests/noPassthrough/timestamp_index_builds.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/jstests/noPassthrough/timestamp_index_builds.js b/jstests/noPassthrough/timestamp_index_builds.js
index 7b0613bfff0..5296dc44d8f 100644
--- a/jstests/noPassthrough/timestamp_index_builds.js
+++ b/jstests/noPassthrough/timestamp_index_builds.js
@@ -25,6 +25,8 @@
(function() {
"use strict";
+load('jstests/noPassthrough/libs/index_build.js');
+
const rst = new ReplSetTest({
name: "timestampingIndexBuilds",
nodes: 2,
@@ -74,7 +76,7 @@ for (let nodeIdx = 0; nodeIdx < 2; ++nodeIdx) {
nodeIdentity);
let conn = rst.start(nodeIdx, {noReplSet: true, noCleanData: true});
assert.neq(null, conn, "failed to restart node");
- assert.eq(1, getColl(conn).getIndexes().length);
+ IndexBuildTest.assertIndexes(getColl(conn), 1, ['_id_']);
rst.stop(nodeIdx);
}
@@ -84,7 +86,7 @@ for (let nodeIdx = 0; nodeIdx < 2; ++nodeIdx) {
jsTestLog("Starting as a replica set. Both indexes should exist. Node: " + nodeIdentity);
let conn = rst.start(nodeIdx, {startClean: false}, true);
conn.setSlaveOk();
- assert.eq(2, getColl(conn).getIndexes().length);
+ IndexBuildTest.assertIndexes(getColl(conn), 2, ['_id_', 'foo_1']);
rst.stop(nodeIdx);
}
@@ -95,7 +97,7 @@ for (let nodeIdx = 0; nodeIdx < 2; ++nodeIdx) {
nodeIdentity);
let conn = rst.start(nodeIdx, {noReplSet: true, noCleanData: true});
assert.neq(null, conn, "failed to restart node");
- assert.eq(1, getColl(conn).getIndexes().length);
+ IndexBuildTest.assertIndexes(getColl(conn), 1, ['_id_']);
rst.stop(nodeIdx);
}
}