mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
better debugging
This commit is contained in:
parent
2a4fc317fc
commit
336a1db691
@ -82,8 +82,9 @@ wait(function() {
|
||||
printjson(master.getDB("admin").runCommand({replSetGetStatus:1}));
|
||||
master.setSlaveOk();
|
||||
var newConfig = master.getDB("local").system.replset.findOne();
|
||||
print( "newConfig: " + tojson(newConfig) );
|
||||
return newConfig.version == 4;
|
||||
});
|
||||
} , "wait1" );
|
||||
|
||||
|
||||
print("Make sure everyone's secondary");
|
||||
@ -103,7 +104,7 @@ wait(function() {
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
} , "wait2" );
|
||||
|
||||
replTest.stopSet();
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
var count = 0;
|
||||
var w = 0;
|
||||
|
||||
var wait = function(f) {
|
||||
var wait = function(f,msg) {
|
||||
w++;
|
||||
var n = 0;
|
||||
while (!f()) {
|
||||
@ -11,7 +11,7 @@ var wait = function(f) {
|
||||
if (++n == 4) {
|
||||
print("" + f);
|
||||
}
|
||||
assert(n < 200, 'tried 200 times, giving up');
|
||||
assert(n < 200, 'tried 200 times, giving up on ' + msg );
|
||||
sleep(1000);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user