summaryrefslogtreecommitdiff
path: root/jstests/replsets/rslib.js
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@mongodb.com>2014-10-20 13:07:06 -0400
committerAndy Schwerin <schwerin@mongodb.com>2014-10-20 13:36:55 -0400
commitdea49e01a983036be793efa22874b2e600b735e0 (patch)
tree4844e92ac8639f8433523cf9b1b632ccabd2dfe4 /jstests/replsets/rslib.js
parent405882053351bcdb602ddac44f8ead8404ff9345 (diff)
downloadmongo-dea49e01a983036be793efa22874b2e600b735e0.tar.gz
SERVER-15535 Perform better error detection in stepdown.js
Diffstat (limited to 'jstests/replsets/rslib.js')
-rw-r--r--jstests/replsets/rslib.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/jstests/replsets/rslib.js b/jstests/replsets/rslib.js
index 8b7d2ed1263..e6c557d7255 100644
--- a/jstests/replsets/rslib.js
+++ b/jstests/replsets/rslib.js
@@ -98,14 +98,17 @@ var waitForAllMembers = function(master, timeout) {
};
var reconfig = function(rs, config) {
+ "use strict";
var admin = rs.getMaster().getDB("admin");
-
+ var e;
+ var master;
try {
- var ok = admin.runCommand({replSetReconfig : config});
- assert.eq(ok.ok,1);
+ assert.commandWorked(admin.runCommand({replSetReconfig : config}));
}
- catch(e) {
- print(e);
+ catch (e) {
+ if (tojson(e).indexOf( "error doing query: failed" ) < 0) {
+ throw e;
+ }
}
master = rs.getMaster().getDB("admin");