summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorMisha Tyulenev <misha.tyulenev@10gen.com>2019-09-05 18:09:11 +0000
committerevergreen <evergreen@mongodb.com>2019-09-05 18:09:11 +0000
commit174736c49e4a284d12c2d31a3f9c8bf341a35c65 (patch)
tree35f71705fd4905a27228f431a9f32fcd326ae776 /jstests
parentb0cec0a0df890b6f29e414fab63b951f1effd996 (diff)
downloadmongo-174736c49e4a284d12c2d31a3f9c8bf341a35c65.tar.gz
SERVER-43017 wait in an integration test for setFCV to propagate to all config server nodes.
Diffstat (limited to 'jstests')
-rw-r--r--jstests/multiVersion/genericSetFCVUsage/crash_mongos_against_upgraded_cluster.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/jstests/multiVersion/genericSetFCVUsage/crash_mongos_against_upgraded_cluster.js b/jstests/multiVersion/genericSetFCVUsage/crash_mongos_against_upgraded_cluster.js
index 5b3b5955770..d99751967ab 100644
--- a/jstests/multiVersion/genericSetFCVUsage/crash_mongos_against_upgraded_cluster.js
+++ b/jstests/multiVersion/genericSetFCVUsage/crash_mongos_against_upgraded_cluster.js
@@ -28,6 +28,13 @@ assert(!lastStableMongos);
// Assert that a mongos using the 'last-stable' binary version will successfully connect to a
// cluster running on the 'latest' binary version with the 'last-stable' FCV.
assert.commandWorked(mongosAdminDB.runCommand({setFeatureCompatibilityVersion: lastStableFCV}));
+
+// wait until all config server nodes are downgraded
+// awaitReplication waits for all slaves to replicate primary's latest opTime which will
+// guarantee propagation of the write to the admin.system.version collection which triggers the
+// change FCV.
+st.configRS.awaitReplication();
+
lastStableMongos = MongoRunner.runMongos({configdb: st.configRS.getURL(), binVersion: lastStable});
assert.neq(null,
lastStableMongos,