diff options
Diffstat (limited to 'jstests/sharding/replset_config/autodiscover_config_rs_from_secondary.js')
-rw-r--r-- | jstests/sharding/replset_config/autodiscover_config_rs_from_secondary.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/jstests/sharding/replset_config/autodiscover_config_rs_from_secondary.js b/jstests/sharding/replset_config/autodiscover_config_rs_from_secondary.js index eb26f0f11ba..d0c4e84d8bd 100644 --- a/jstests/sharding/replset_config/autodiscover_config_rs_from_secondary.js +++ b/jstests/sharding/replset_config/autodiscover_config_rs_from_secondary.js @@ -25,6 +25,10 @@ var seedList = rst.name + "/" + rst.nodes[1].host; // node 1 is guaranteed to no MongoRunner.stopMongos(mongos); } +// Wait for replication to all config server replica set members to ensure that mongos +// doesn't read from a stale config server when trying to verify if the initial cluster metadata +// has been properly written. +rst.awaitReplication(); // Now take down the one electable node rst.stop(0); rst.awaitNoPrimary(); |