summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaley Connelly <haley.connelly@mongodb.com>2021-10-19 19:00:11 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-10-19 22:03:07 +0000
commit55a739ccd3fc41b4b77c2833206fd908991e9d05 (patch)
treeb8678474d2f1f20de372b6a1834a6180c6bd1eed
parent2acb4a22da20968ba90f60f482877f10511308e9 (diff)
downloadmongo-55a739ccd3fc41b4b77c2833206fd908991e9d05.tar.gz
SERVER-60822 Prevent set_index_commit_quorum_through_mongos.js from running with single phase index builds
-rw-r--r--jstests/sharding/set_index_commit_quorum_through_mongos.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/jstests/sharding/set_index_commit_quorum_through_mongos.js b/jstests/sharding/set_index_commit_quorum_through_mongos.js
index fabcc3e161b..2326db57005 100644
--- a/jstests/sharding/set_index_commit_quorum_through_mongos.js
+++ b/jstests/sharding/set_index_commit_quorum_through_mongos.js
@@ -7,6 +7,7 @@
"use strict";
load("jstests/libs/fail_point_util.js");
load('jstests/libs/parallelTester.js');
+load('jstests/noPassthrough/libs/index_build.js');
const st = new ShardingTest({shards: 2, mongos: 1, rs: {nodes: 2}});
const dbName = "testDB";
@@ -14,6 +15,14 @@ const collName = "coll";
const mongosDB = st.s0.getDB(dbName);
const shard0 = st.shard0.rs.getPrimary();
+if (!(IndexBuildTest.supportsTwoPhaseIndexBuild(shard0) &&
+ IndexBuildTest.indexBuildCommitQuorumEnabled(shard0))) {
+ jsTestLog(
+ 'Skipping test because two phase index build and index build commit quorum are not supported.');
+ st.stop();
+ return;
+}
+
const generateCreateIndexThread = (host, dbName, collName) => {
return new Thread(function(host, dbName, collName) {
const mongos = new Mongo(host);