summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheahuychou Mao <mao.cheahuychou@gmail.com>2023-05-15 14:32:02 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-05-15 16:52:55 +0000
commit5e4700a33332daebdf3468c1276d401ab6974305 (patch)
tree0549acd292d5897f519ec4b68d8481b65eb013e7
parentae9dcbeaba01de7526e3ea45902bb9ae2905d537 (diff)
downloadmongo-5e4700a33332daebdf3468c1276d401ab6974305.tar.gz
SERVER-77094 refresh_sample_rates.js should wait for the config server to know about the number of mongoses in the cluster
-rw-r--r--jstests/sharding/analyze_shard_key/refresh_sample_rates.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/jstests/sharding/analyze_shard_key/refresh_sample_rates.js b/jstests/sharding/analyze_shard_key/refresh_sample_rates.js
index c63d7410bdb..c17bcb31d30 100644
--- a/jstests/sharding/analyze_shard_key/refresh_sample_rates.js
+++ b/jstests/sharding/analyze_shard_key/refresh_sample_rates.js
@@ -293,6 +293,11 @@ function runTest(createConnFn, rst, samplerNames) {
st.configRS.isConfigSvr = true;
const samplerNames = [st.s0.host, st.s1.host, st.s2.host];
+ jsTest.log("Wait for the config server to be aware that there are 3 mongoses in the cluster");
+ assert.soon(() => {
+ return st.s.getCollection("config.mongos").find().itcount() == 3;
+ });
+
jsTest.log("Test that the _refreshQueryAnalyzerConfiguration command is not supported on " +
"mongos or shardsvr mongod or configsvr secondary mongod");
const cmdObj = {