diff options
author | Tommaso Tocci <tommaso.tocci@mongodb.com> | 2020-10-13 09:50:30 +0200 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-10-16 15:46:20 +0000 |
commit | 77a42ecdd91ae10d2953d592b899e05d5aeca0a4 (patch) | |
tree | 000ad272db4abf7cfbac7207c60d5c6c0d92b4f1 | |
parent | 1e68617f9f9716d9235086ee8967bf597d5f6199 (diff) | |
download | mongo-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.js | 6 |
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 |