Skip to content

Commit

Permalink
SERVER-14755 increase ReplSetTest timeouts to prevent spurious failur…
Browse files Browse the repository at this point in the history
…es while using HybridCoordinator
  • Loading branch information
matt dannenberg committed Jul 31, 2014
1 parent 7e6b8c8 commit 9ec7d68
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion jstests/repl/repl6.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var baseName = "jstests_repl6test";
soonCount = function( m, count ) {
assert.soon( function() {
return m.getDB( baseName ).a.find().count() == count;
}, "expected count: " + count + " from : " + m );
}, "expected count: " + count + " from : " + m, 60 * 1000);
}

doTest = function( signal ) {
Expand Down
2 changes: 1 addition & 1 deletion jstests/replsets/rollback_too_new.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ assert.soon(function() {
catch (e) {
return false;
}
}, "B failed to go FATAL");
}, "B failed to go FATAL", 60 * 1000);

replTest.stopSet();
2 changes: 1 addition & 1 deletion jstests/replsets/rslib.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var wait = function(f,msg) {
if (++n == 4) {
print("" + f);
}
assert(n < 200, 'tried 200 times, giving up on ' + msg );
assert(n < 400, 'tried 400 times, giving up on ' + msg );
sleep(1000);
}
};
Expand Down
2 changes: 1 addition & 1 deletion jstests/replsets/stepdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ assert.soon(function() {
} catch (x) {
return false;
}
}, 'wait for 31000 to be primary', 60000);
}, 'wait for 31000 to be primary', 2 * 60 * 1000);

master = replTest.getMaster();
var firstMaster = master;
Expand Down
4 changes: 2 additions & 2 deletions jstests/replsets/sync2.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ replTest.partition(4,1);
replTest.partition(4,3);

jsTestLog("Checking that ops still replicate correctly");
var option = { writeConcern: { w: 5, wtimeout: 30000 }};
var option = { writeConcern: { w: 5, wtimeout: 60000 }};
assert.writeOK(master.getDB("foo").bar.insert({ x: 1 }, option));

// 4 is connected to 3
replTest.partition(4,2);
replTest.unPartition(4,3);

option = { writeConcern: { w: 5, wtimeout: 30000 }};
option = { writeConcern: { w: 5, wtimeout: 60000 }};
assert.writeOK(master.getDB("foo").bar.insert({ x: 1 }, option));

replTest.stopSet();
4 changes: 2 additions & 2 deletions jstests/slow1/replsets_priority1.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ var checkPrimaryIs = function (node) {
}, 15);

return ok;
}, node.host + '==1', 60000, 1000);
}, node.host + '==1', 2 * 60 * 1000, 1000);

everyoneOkSoon();
};
Expand Down Expand Up @@ -150,7 +150,7 @@ for (i=0; i<n; i++) {
assert.soon(function() {
rs.getMaster();
return rs.liveNodes.slaves.length == 2;
}, "2 slaves");
}, "2 slaves", 60 * 1000);

print("\nreplsets_priority1.js wait for new config version " + config.version);

Expand Down
8 changes: 4 additions & 4 deletions src/mongo/shell/replsettest.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ ReplSetTest.prototype.awaitSecondaryNodes = function( timeout ) {
ReplSetTest.prototype.getMaster = function( timeout ) {
var tries = 0;
var sleepTime = 500;
var tmo = timeout || 60000;
var tmo = timeout || 2 * 60 * 1000; // 2 mins
var master = null;

try {
Expand Down Expand Up @@ -438,7 +438,7 @@ ReplSetTest.prototype.initiate = function( cfg , initCmd , timeout ) {
var config = cfg || this.getReplSetConfig();
var cmd = {};
var cmdKey = initCmd || 'replSetInitiate';
var timeout = timeout || 60000;
var timeout = timeout || 2 * 60 * 1000; // 2 mins
cmd[cmdKey] = config;
printjson(cmd);

Expand All @@ -462,7 +462,7 @@ ReplSetTest.prototype.reInitiate = function(timeout) {
var master = this.nodes[0];
var c = master.getDB("local")['system.replset'].findOne();
var config = this.getReplSetConfig();
var timeout = timeout || 60000;
var timeout = timeout || 2 * 60 * 1000; // 2 mins
config.version = c.version + 1;
this.initiate( config , 'replSetReconfig', timeout );
}
Expand All @@ -485,7 +485,7 @@ ReplSetTest.prototype.getLastOpTimeWritten = function() {
};

ReplSetTest.prototype.awaitReplication = function(timeout) {
timeout = timeout || 30000;
timeout = timeout || 60000;

this.getLastOpTimeWritten();

Expand Down

0 comments on commit 9ec7d68

Please sign in to comment.