summaryrefslogtreecommitdiff
path: root/jstests/sharding/index_commands_shard_targeting.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/sharding/index_commands_shard_targeting.js')
-rw-r--r--jstests/sharding/index_commands_shard_targeting.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/jstests/sharding/index_commands_shard_targeting.js b/jstests/sharding/index_commands_shard_targeting.js
index 3f588e941bf..271dc6fdbdb 100644
--- a/jstests/sharding/index_commands_shard_targeting.js
+++ b/jstests/sharding/index_commands_shard_targeting.js
@@ -103,13 +103,14 @@ function assertCommandBlocksIfCriticalSectionInProgress(
joinMoveChunk();
}
-const numShards = 3;
-const st = new ShardingTest({shards: numShards});
-
// Disable checking for index consistency to ensure that the config server doesn't trigger a
// StaleShardVersion exception on shards and cause them to refresh their sharding metadata.
-st._configServers.forEach(
- config => config.adminCommand({setParameter: 1, enableShardedIndexConsistencyCheck: false}));
+const nodeOptions = {
+ setParameter: {enableShardedIndexConsistencyCheck: false}
+};
+
+const numShards = 3;
+const st = new ShardingTest({shards: numShards, other: {configOptions: nodeOptions}});
const allShards = [];
for (let i = 0; i < numShards; i++) {