Skip to content

Commit

Permalink
fix test for when sockets close
Browse files Browse the repository at this point in the history
  • Loading branch information
erh committed Dec 3, 2011
1 parent f0d3555 commit 8548801
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions jstests/replsets/auth2.js
Expand Up @@ -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.");
Expand Down

0 comments on commit 8548801

Please sign in to comment.