diff options
author | Benety Goh <benety@mongodb.com> | 2019-10-10 12:55:41 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-10-10 12:55:41 +0000 |
commit | 69ef3ed5cf4ac634fd7a749f9428871ec6f40fd2 (patch) | |
tree | cd9e24fc017d5e2f1146b065c3968ead45b5ab82 /jstests/noPassthrough/timestamp_index_builds.js | |
parent | 424c1eb4c8cc50219d2a741741275dfdc3ecf3fa (diff) | |
download | mongo-69ef3ed5cf4ac634fd7a749f9428871ec6f40fd2.tar.gz |
SERVER-43639 fix tests to support two phase index builds
Diffstat (limited to 'jstests/noPassthrough/timestamp_index_builds.js')
-rw-r--r-- | jstests/noPassthrough/timestamp_index_builds.js | 8 |
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); } } |