mirror of https://github.com/mongodb/mongo
SERVER-111135 retry configureFailPoint in setFastGetMoreEnabled in rollback_test.js (#41764)
GitOrigin-RevId: 9ef34f64180a28b6712e9de2e69d4a5634116399
This commit is contained in:
parent
c9635dd78a
commit
a23b4626c6
|
|
@ -194,10 +194,26 @@ function RollbackTest(name = "RollbackTest", replSet, nodeOptions) {
|
|||
* maximum of 50 milliseconds.
|
||||
*/
|
||||
function setFastGetMoreEnabled(node) {
|
||||
assert.commandWorked(
|
||||
node.adminCommand(
|
||||
{configureFailPoint: 'setSmallOplogGetMoreMaxTimeMS', mode: 'alwaysOn'}),
|
||||
`Failed to enable setSmallOplogGetMoreMaxTimeMS failpoint.`);
|
||||
assert.soon(
|
||||
() => {
|
||||
try {
|
||||
assert.commandWorked(
|
||||
node.adminCommand({
|
||||
configureFailPoint: "setSmallOplogGetMoreMaxTimeMS",
|
||||
mode: "alwaysOn"
|
||||
}),
|
||||
`Failed to enable setSmallOplogGetMoreMaxTimeMS failpoint.`,
|
||||
);
|
||||
return true;
|
||||
} catch (e) {
|
||||
if (isNetworkError(e)) {
|
||||
return false;
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
},
|
||||
`Failed to set failpoint "setSmallOplogGetMoreMaxTimeMS" on ${tojson(node.host)}`,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue