Skip to content

Commit

Permalink
same edge fix as stepdown.js
Browse files Browse the repository at this point in the history
  • Loading branch information
kchodorow committed Jul 19, 2011
1 parent 5ec2c61 commit 8e0ccdf
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions jstests/replsets/stepdown2.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,24 @@ assert.eq(result.ok, 0);

print("\nsend shutdown command");

var thrown = false;
var currentMaster = replTest.getMaster();
try {
replTest.getMaster().getDB("admin").runCommand({shutdown : 1, force : true});
printjson(currentMaster.getDB("admin").runCommand({shutdown : 1, force : true}));
}
catch (e) {
print(e);
thrown = true;
}
assert(thrown);

print("checking "+currentMaster+" is actually shutting down");
assert.soon(function() {
try {
currentMaster.findOne();
}
catch(e) {
return true;
}
return false;
});

print("\nOK 1 stepdown2.js");

Expand Down

0 comments on commit 8e0ccdf

Please sign in to comment.