Skip to content

Commit db21605

Browse files
committed
SERVER-22303 Wait longer for initial sync to finish in csrs_upgrade_during_migrate.js test
1 parent a8c2e2c commit db21605

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

jstests/replsets/rslib.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,10 @@ awaitOpTime = function (node, opTime) {
160160
/**
161161
* Uses the results of running replSetGetStatus against an arbitrary replset node to wait until
162162
* all nodes in the set are replicated through the same optime.
163+
* 'rs' is an array of connections to replica set nodes. This function is useful when you
164+
* don't have a ReplSetTest object to use, otherwise ReplSetTest.awaitReplication is preferred.
163165
*/
164-
waitUntilAllNodesCaughtUp = function(rs) {
166+
waitUntilAllNodesCaughtUp = function(rs, timeout) {
165167
var rsStatus;
166168
var firstConflictingIndex;
167169
var ot;
@@ -185,7 +187,7 @@ waitUntilAllNodesCaughtUp = function(rs) {
185187
}, function () {
186188
return "Optimes of members 0 (" + tojson(ot) + ") and " + firstConflictingIndex + " (" +
187189
tojson(otherOt) + ") are different in " + tojson(rsStatus);
188-
});
190+
}, timeout);
189191
};
190192

191193
/**

jstests/sharding/csrs_upgrade_during_migrate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ var st;
127127
jsTest.log("Adding non-voting members to csrs set: " + tojson(csrsConfig));
128128
assert.commandWorked(csrs[0].adminCommand({replSetReconfig: csrsConfig}));
129129

130-
waitUntilAllNodesCaughtUp(csrs);
130+
waitUntilAllNodesCaughtUp(csrs, 60000);
131131

132132
jsTest.log("Starting long-running chunk migration");
133133
var joinParallelShell = startParallelShell(

0 commit comments

Comments
 (0)