diff options
author | Jonathan Reams <jbreams@mongodb.com> | 2017-05-04 14:22:18 -0400 |
---|---|---|
committer | Jonathan Reams <jbreams@mongodb.com> | 2017-05-05 15:22:55 -0400 |
commit | 960e238d4ae9fadb02b8f9566a392d232d6fdf27 (patch) | |
tree | 9428db911cd2f2e9668ca01013ee9b12486d43a1 | |
parent | ffeca900972e305396f537c5b3b27e126e6746f9 (diff) | |
download | mongo-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.js | 11 |
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}); |