summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheahuychou Mao <cheahuychou.mao@mongodb.com>2020-04-02 14:36:54 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-04-03 19:57:41 +0000
commit3c97892206735c532cfeda0c0cb045c2b1f2758a (patch)
treea86e60147e124ce3320ca2e6cae38a74e984748b
parent5cc7aee1f253d9ad36e3d2fa68086022c26d2410 (diff)
downloadmongo-3c97892206735c532cfeda0c0cb045c2b1f2758a.tar.gz
SERVER-30739 config_server_checks.js should assert if initial replSetConfig fails
-rw-r--r--jstests/replsets/config_server_checks.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/jstests/replsets/config_server_checks.js b/jstests/replsets/config_server_checks.js
index 3567e52925e..e301ca4cfa0 100644
--- a/jstests/replsets/config_server_checks.js
+++ b/jstests/replsets/config_server_checks.js
@@ -32,11 +32,15 @@ function expectState(rst, state) {
rst.startSet();
var conf = rst.getReplSetConfig();
conf.configsvr = true;
+
try {
- rst.nodes[0].adminCommand({replSetInitiate: conf});
+ assert.commandWorked(rst.nodes[0].adminCommand({replSetInitiate: conf}));
} catch (e) {
- // expected since we close all connections after going into REMOVED
+ if (!isNetworkError(e)) {
+ throw e;
+ }
}
+
expectState(rst, ReplSetTest.State.REMOVED);
rst.stopSet();
})();