summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jstests/replsets/auth2.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/jstests/replsets/auth2.js b/jstests/replsets/auth2.js
index 353b0373004..0fe1ae404de 100644
--- a/jstests/replsets/auth2.js
+++ b/jstests/replsets/auth2.js
@@ -38,8 +38,13 @@ var checkNoAuth = function() {
var checkInvalidAuthStates = function() {
print("check that 0 is in recovering");
assert.soon(function() {
- var result = m.getDB("admin").runCommand({isMaster: 1});
- return !result.ismaster && !result.secondary;
+ try {
+ var result = m.getDB("admin").runCommand({isMaster: 1});
+ return !result.ismaster && !result.secondary;
+ }
+ catch ( e ) {
+ print( e );
+ }
});
print("shut down 1, 0 still in recovering.");