diff options
Diffstat (limited to 'jstests/sharding/txn_two_phase_commit_wait_for_majority_commit_after_stepup.js')
-rw-r--r-- | jstests/sharding/txn_two_phase_commit_wait_for_majority_commit_after_stepup.js | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/jstests/sharding/txn_two_phase_commit_wait_for_majority_commit_after_stepup.js b/jstests/sharding/txn_two_phase_commit_wait_for_majority_commit_after_stepup.js index b15a7f9f8f9..9d20c7cd8dd 100644 --- a/jstests/sharding/txn_two_phase_commit_wait_for_majority_commit_after_stepup.js +++ b/jstests/sharding/txn_two_phase_commit_wait_for_majority_commit_after_stepup.js @@ -104,14 +104,11 @@ stopServerReplication([coordPrimary, coordSecondary]); // Induce the coordinator primary to step down. - const stepDownResult = assert.throws(function() { - // The amount of time the node has to wait before becoming primary again. - const stepDownSecs = 1; - coordPrimary.adminCommand({replSetStepDown: stepDownSecs, force: true}); - }); - assert(isNetworkError(stepDownResult), - 'Expected exception from stepping down coordinator primary ' + coordPrimary.host + ': ' + - tojson(stepDownResult)); + + // The amount of time the node has to wait before becoming primary again. + const stepDownSecs = 1; + assert.commandWorked(coordPrimary.adminCommand({replSetStepDown: stepDownSecs, force: true})); + assert.commandWorked(coordPrimary.adminCommand({ configureFailPoint: "hangBeforeWritingDecision", mode: "off", |