diff options
author | Eliot Horowitz <eliot@10gen.com> | 2011-12-03 00:12:34 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2011-12-03 00:12:34 -0500 |
commit | 85488010f7f553aceea9924da023796fdb308a1e (patch) | |
tree | dd6e09c9b7834fc22fa042d140ed5f249274c46b | |
parent | f0d35552f7b982d63362f8221d5a5e87d49fc9af (diff) | |
download | mongo-85488010f7f553aceea9924da023796fdb308a1e.tar.gz |
fix test for when sockets close
-rw-r--r-- | jstests/replsets/auth2.js | 9 |
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."); |