summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTommaso Tocci <tommaso.tocci@mongodb.com>2020-10-13 09:50:30 +0200
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-10-16 15:46:20 +0000
commit77a42ecdd91ae10d2953d592b899e05d5aeca0a4 (patch)
tree000ad272db4abf7cfbac7207c60d5c6c0d92b4f1
parent1e68617f9f9716d9235086ee8967bf597d5f6199 (diff)
downloadmongo-77a42ecdd91ae10d2953d592b899e05d5aeca0a4.tar.gz
SERVER-51683 Await configRS optime replication before to stop it in lagged_config_secondary.js
-rw-r--r--jstests/sharding/lagged_config_secondary.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/sharding/lagged_config_secondary.js b/jstests/sharding/lagged_config_secondary.js
index 0c47ce6e354..ed0370029ca 100644
--- a/jstests/sharding/lagged_config_secondary.js
+++ b/jstests/sharding/lagged_config_secondary.js
@@ -20,15 +20,15 @@ var testDB = st.s.getDB('test');
assert.commandWorked(testDB.adminCommand({enableSharding: 'test'}));
assert.commandWorked(testDB.adminCommand({shardCollection: 'test.user', key: {_id: 1}}));
-// Ensures that all metadata writes thus far have been replicated to all nodes
-st.configRS.awaitReplication();
-
var configSecondaryList = st.configRS.getSecondaries();
var configSecondaryToKill = configSecondaryList[0];
var delayedConfigSecondary = configSecondaryList[1];
assert.commandWorked(testDB.user.insert({_id: 1}));
+// Ensures that all metadata writes thus far have been replicated to all nodes
+st.configRS.awaitReplication();
+
stopServerReplication(delayedConfigSecondary);
// Do one metadata write in order to bump the optime on mongos