summaryrefslogtreecommitdiff
path: root/jstests/replsets/config_server_checks.js
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2016-04-22 11:07:15 -0400
committerBenety Goh <benety@mongodb.com>2016-04-25 12:05:18 -0400
commit97d05f8a666b13b344a208448564b8417e1e9114 (patch)
treec78f0ffc9ac6b54aefc9b82bc7526c497740bc2e /jstests/replsets/config_server_checks.js
parent85f3d108a95e4286fe03e517a586ce9f34d12d53 (diff)
downloadmongo-97d05f8a666b13b344a208448564b8417e1e9114.tar.gz
SERVER-23875 MongoRunner._startWithArgs returns pid if not waiting for connection
config_server_checks.js should wait for server to shutdown instead of trying to connect to it.
Diffstat (limited to 'jstests/replsets/config_server_checks.js')
-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 8fb6b813667..041b3a29699 100644
--- a/jstests/replsets/config_server_checks.js
+++ b/jstests/replsets/config_server_checks.js
@@ -131,10 +131,14 @@ function expectState(rst, state) {
var options = node.savedOptions;
delete options.configsvr;
options.noCleanData = true;
+ options.waitForConnect = false;
MongoRunner.stopMongod(node);
- var conn = MongoRunner.runMongod(options);
- assert.eq(null, conn, "Mongod should have failed to start, but didn't");
+
+ var mongod = MongoRunner.runMongod(options);
+ var exitCode = waitProgram(mongod.pid);
+ assert.eq(
+ MongoRunner.EXIT_ABRUPT, exitCode, "Mongod should have failed to start, but didn't");
rst.stopSet();
})();