diff options
Diffstat (limited to 'jstests/sharding/movechunk_interrupt_at_primary_stepdown.js')
-rw-r--r-- | jstests/sharding/movechunk_interrupt_at_primary_stepdown.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/jstests/sharding/movechunk_interrupt_at_primary_stepdown.js b/jstests/sharding/movechunk_interrupt_at_primary_stepdown.js index 70d0edd6258..7158d12c719 100644 --- a/jstests/sharding/movechunk_interrupt_at_primary_stepdown.js +++ b/jstests/sharding/movechunk_interrupt_at_primary_stepdown.js @@ -37,10 +37,7 @@ load('./jstests/libs/chunk_manipulation_util.js'); // Stepdown the primary in order to force the balancer to stop. Use a timeout of 5 seconds for // both step down operations, because mongos will retry to find the CSRS primary for up to 20 // seconds and we have two successive ones. - assert.throws(function() { - assert.commandWorked( - st.configRS.getPrimary().adminCommand({replSetStepDown: 5, force: true})); - }); + assert.commandWorked(st.configRS.getPrimary().adminCommand({replSetStepDown: 5, force: true})); // Ensure a new primary is found promptly st.configRS.getPrimary(30000); @@ -56,10 +53,7 @@ load('./jstests/libs/chunk_manipulation_util.js'); // At this point, the balancer is in recovery mode. Ensure that stepdown can be done again and // the recovery mode interrupted. - assert.throws(function() { - assert.commandWorked( - st.configRS.getPrimary().adminCommand({replSetStepDown: 5, force: true})); - }); + assert.commandWorked(st.configRS.getPrimary().adminCommand({replSetStepDown: 5, force: true})); // Ensure a new primary is found promptly st.configRS.getPrimary(30000); |