summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Reams <jbreams@mongodb.com>2017-05-04 14:22:18 -0400
committerJonathan Reams <jbreams@mongodb.com>2017-05-05 15:22:55 -0400
commit960e238d4ae9fadb02b8f9566a392d232d6fdf27 (patch)
tree9428db911cd2f2e9668ca01013ee9b12486d43a1
parentffeca900972e305396f537c5b3b27e126e6746f9 (diff)
downloadmongo-960e238d4ae9fadb02b8f9566a392d232d6fdf27.tar.gz
SERVER-29068 Retry operations in set_feature_compatibility_version.js after network interruption
-rw-r--r--jstests/multiVersion/set_feature_compatibility_version.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/jstests/multiVersion/set_feature_compatibility_version.js b/jstests/multiVersion/set_feature_compatibility_version.js
index 11137f081b7..d5c73f26efb 100644
--- a/jstests/multiVersion/set_feature_compatibility_version.js
+++ b/jstests/multiVersion/set_feature_compatibility_version.js
@@ -342,7 +342,16 @@
st.rs0.getPrimary().discardMessagesFrom(st.configRS.getPrimary(), 0.0);
// featureCompatibilityVersion can be set to 3.2 on mongos.
- assert.commandWorked(mongosAdminDB.runCommand({setFeatureCompatibilityVersion: "3.2"}));
+ // This is run through assert.soon() because we've just caused a network interruption
+ // by discarding messages in the bridge.
+ assert.soon(function() {
+ var res = mongosAdminDB.runCommand({setFeatureCompatibilityVersion: "3.2"});
+ if (res.ok == 0) {
+ print("Failed to set feature compatibility version: " + tojson(res));
+ return false;
+ }
+ return true;
+ });
// featureCompatibilityVersion propagates to config and shard.
res = configPrimaryAdminDB.runCommand({getParameter: 1, featureCompatibilityVersion: 1});