summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jstests/replsets/split_horizon_hostname_startup.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/jstests/replsets/split_horizon_hostname_startup.js b/jstests/replsets/split_horizon_hostname_startup.js
index 235f0e3add6..afeaba2da4e 100644
--- a/jstests/replsets/split_horizon_hostname_startup.js
+++ b/jstests/replsets/split_horizon_hostname_startup.js
@@ -48,7 +48,11 @@ startupConfig.port = mongod.port;
mongod = MongoRunner.runMongod(startupConfig);
assert(mongod);
-let rsConfig2 = mongod.adminCommand({replSetGetConfig: 1});
+let rsConfig2;
+assert.soon(() => {
+ rsConfig2 = mongod.adminCommand({replSetGetConfig: 1});
+ return rsConfig2.ok;
+}, "Failed to get replset config from node");
jsTestLog("rsConfig2: " + tojson(rsConfig2));
assert.commandWorked(rsConfig2);
assert.eq(tojson(rsConfig2.config.members), tojson(rsConfig1.config.members));