diff options
author | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2015-06-23 22:22:52 -0400 |
---|---|---|
committer | Max Hirschhorn <max.hirschhorn@mongodb.com> | 2015-06-23 22:22:52 -0400 |
commit | dd0c8d73aad862770866a65f5494e51620edfc7e (patch) | |
tree | 316ecff8aa38cf478ebf53a38097d73035ad32a9 /jstests/replsets/stepdown_long_wait_time.js | |
parent | cb23019011883f3c5f0ce0876248e80f05de4581 (diff) | |
download | mongo-dd0c8d73aad862770866a65f5494e51620edfc7e.tar.gz |
SERVER-18868 Check the exit code of the parallel shell.
By default the await function returned by startParallelShell() asserts
that the exit code is zero.
Diffstat (limited to 'jstests/replsets/stepdown_long_wait_time.js')
-rw-r--r-- | jstests/replsets/stepdown_long_wait_time.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/jstests/replsets/stepdown_long_wait_time.js b/jstests/replsets/stepdown_long_wait_time.js index 3ec955eab24..e4d6419a419 100644 --- a/jstests/replsets/stepdown_long_wait_time.js +++ b/jstests/replsets/stepdown_long_wait_time.js @@ -78,7 +78,11 @@ jsTestLog("signal update thread to exit"); var newPrimary = replSet.getPrimary(); assert.writeOK(newPrimary.getDB(name).foo.remove({})); - stepDowner(); - writer(); + var exitCode = stepDowner({checkExitSuccess: false}); + assert.neq(0, exitCode, "expected replSetStepDown to close the shell's connection"); + + // The connection for the 'writer' may be closed due to the primary stepping down, or signaled + // by the main thread to quit. + writer({checkExitSuccess: false}); })(); |