diff options
Diffstat (limited to 'jstests/replsets/rollback_remote_cursor_retry.js')
-rw-r--r-- | jstests/replsets/rollback_remote_cursor_retry.js | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/jstests/replsets/rollback_remote_cursor_retry.js b/jstests/replsets/rollback_remote_cursor_retry.js index 2e2db8c5df6..7a44d00bf9e 100644 --- a/jstests/replsets/rollback_remote_cursor_retry.js +++ b/jstests/replsets/rollback_remote_cursor_retry.js @@ -7,8 +7,8 @@ (function() { "use strict"; +load("jstests/libs/fail_point_util.js"); load("jstests/replsets/libs/rollback_test.js"); -load("jstests/libs/check_log.js"); const testName = "rollback_remote_cursor_retry"; const dbName = testName; @@ -25,25 +25,23 @@ const syncSource = rollbackTest.transitionToSyncSourceOperationsBeforeRollback() // This failpoint is used to make sure that we have started rollback before turning on // 'failCommand'. Otherwise, we would be failing the 'find' command that we issue against // the sync source before we decide to go into rollback. -assert.commandWorked( - rollbackNode.adminCommand({configureFailPoint: "rollbackHangBeforeStart", mode: "alwaysOn"})); +const rollbackHangBeforeStartFailPoint = + configureFailPoint(rollbackNode, "rollbackHangBeforeStart"); rollbackTest.transitionToSyncSourceOperationsDuringRollback(); // Ensure that we've hit the failpoint before moving on. -checkLog.contains(rollbackNode, "rollback - rollbackHangBeforeStart fail point enabled"); +rollbackHangBeforeStartFailPoint.wait(); // Fail the 'find' command exactly twice. jsTestLog("Failing the next two 'find' commands."); -assert.commandWorked(syncSource.adminCommand({ - configureFailPoint: "failCommand", - data: {errorCode: 279, failInternalCommands: true, failCommands: ["find"]}, - mode: {times: 2} -})); +configureFailPoint(syncSource, + "failCommand", + {errorCode: 279, failInternalCommands: true, failCommands: ["find"]}, + {times: 2}); // Let rollback proceed. -assert.commandWorked( - rollbackNode.adminCommand({configureFailPoint: "rollbackHangBeforeStart", mode: "off"})); +rollbackHangBeforeStartFailPoint.off(); rollbackTest.transitionToSteadyStateOperations(); rollbackTest.stop(); |