summaryrefslogtreecommitdiff
path: root/jstests/replsets/rollback_too_new.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/replsets/rollback_too_new.js')
-rw-r--r--jstests/replsets/rollback_too_new.js8
1 files changed, 1 insertions, 7 deletions
diff --git a/jstests/replsets/rollback_too_new.js b/jstests/replsets/rollback_too_new.js
index 4e216a6028d..131d80a54fe 100644
--- a/jstests/replsets/rollback_too_new.js
+++ b/jstests/replsets/rollback_too_new.js
@@ -43,13 +43,7 @@
// We bump the term to make sure node 0's oplog is ahead of node 2's.
var term = getLatestOp(conns[0]).t;
- try {
- assert.commandWorked(conns[0].adminCommand({replSetStepDown: 1, force: true}));
- } catch (e) {
- if (!isNetworkError(e)) {
- throw e;
- }
- }
+ assert.adminCommandWorkedAllowingNetworkError(conns[0], {replSetStepDown: 1, force: true});
// After stepping down due to the higher term, it will eventually get reelected.
replTest.waitForState(conns[0], ReplSetTest.State.PRIMARY);