summaryrefslogtreecommitdiff
path: root/jstests/sharding/index_commands_shard_targeting.js
diff options
context:
space:
mode:
authorMarcos José Grillo Ramírez <marcos.grillo@mongodb.com>2020-07-09 18:23:22 +0200
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-07-17 11:43:50 +0000
commit5ed7de1446262088dfa8ea420a7d9af4d92ceed7 (patch)
tree6443e7cbc3e4674ab7dc25221317024921407f31 /jstests/sharding/index_commands_shard_targeting.js
parent8d6112714189fdb6c652ad06a9496c5ade6c0cdc (diff)
downloadmongo-5ed7de1446262088dfa8ea420a7d9af4d92ceed7.tar.gz
SERVER-49311 Prevent the PeriodicShardedIndexConsistencyChecker cause failures on tests that require no metadata refresh to be performed until needed
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++) {