Skip to content

Commit ff42cf8

Browse files
committed
SERVER-21996 Wait for replication to all nodes before shutting down config server primary in test
(cherry picked from commit ae83937)
1 parent 3905aa7 commit ff42cf8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

jstests/sharding/replset_config/autodiscover_config_rs_from_secondary.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ var seedList = rst.name + "/" + rst.nodes[1].host; // node 1 is guaranteed to no
2525
MongoRunner.stopMongos(mongos);
2626
}
2727

28+
// Wait for replication to all config server replica set members to ensure that mongos
29+
// doesn't read from a stale config server when trying to verify if the initial cluster metadata
30+
// has been properly written.
31+
rst.awaitReplication();
2832
// Now take down the one electable node
2933
rst.stop(0);
3034
rst.awaitNoPrimary();

0 commit comments

Comments
 (0)