diff options
author | Cheahuychou Mao <cheahuychou.mao@mongodb.com> | 2019-10-25 19:08:50 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-10-25 19:08:50 +0000 |
commit | 8fc28f0773ca1efb0a43cc5590b9ca8b9e50559e (patch) | |
tree | b4c8dc05588e3dfb408cbf288c4d4389024008f4 /jstests/replsets/kill_reads_with_prepare_conflicts_during_step_down.js | |
parent | 99d90208c67351469dae5983ed233638e61cf732 (diff) | |
download | mongo-8fc28f0773ca1efb0a43cc5590b9ca8b9e50559e.tar.gz |
SERVER-39165 Add waitForFailpoint command and update other repl tests
Diffstat (limited to 'jstests/replsets/kill_reads_with_prepare_conflicts_during_step_down.js')
-rw-r--r-- | jstests/replsets/kill_reads_with_prepare_conflicts_during_step_down.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/jstests/replsets/kill_reads_with_prepare_conflicts_during_step_down.js b/jstests/replsets/kill_reads_with_prepare_conflicts_during_step_down.js index 016f05fd5ea..56f46b58155 100644 --- a/jstests/replsets/kill_reads_with_prepare_conflicts_during_step_down.js +++ b/jstests/replsets/kill_reads_with_prepare_conflicts_during_step_down.js @@ -9,7 +9,7 @@ "use strict"; load("jstests/core/txns/libs/prepare_helpers.js"); -load("jstests/libs/check_log.js"); +load("jstests/libs/fail_point_util.js"); // Start one of the nodes with priority: 0 to avoid elections. const rst = new ReplSetTest({nodes: [{}, {rsConfig: {priority: 0}}]}); @@ -32,8 +32,7 @@ const sessionID = session.getSessionId(); let sessionDB = session.getDatabase(dbName); const sessionColl = sessionDB.getCollection(collName); -assert.commandWorked( - primaryAdmin.adminCommand({configureFailPoint: "WTPrintPrepareConflictLog", mode: "alwaysOn"})); +let failPoint = configureFailPoint(primaryAdmin, "WTPrintPrepareConflictLog"); // Insert a document that we will later modify in a transaction. assert.commandWorked(primaryColl.insert({_id: 1})); @@ -70,7 +69,7 @@ const readBlockedOnPrepareConflictThread = startParallelShell(() => { }, primary.port); jsTestLog("Waiting for failpoint"); -checkLog.contains(primary, "WTPrintPrepareConflictLog fail point enabled"); +failPoint.wait(); // Once we have confirmed that the find command has hit a prepare conflict, we can perform // a step down. |