From 7d7969eb7439b08207e29437e94fc1db5459c205 Mon Sep 17 00:00:00 2001 From: Louis Williams Date: Fri, 2 Feb 2018 17:35:30 -0500 Subject: SERVER-32638: Allow lock acquisition to be interruptable --- src/mongo/shell/replsettest.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/mongo/shell/replsettest.js') diff --git a/src/mongo/shell/replsettest.js b/src/mongo/shell/replsettest.js index b79770eb2a4..c11edd7c4c8 100644 --- a/src/mongo/shell/replsettest.js +++ b/src/mongo/shell/replsettest.js @@ -887,6 +887,7 @@ var ReplSetTest = function(opts) { // if a heartbeat times out during the quorum check. // They may also fail with NewReplicaSetConfigurationIncompatible on similar timeout // during the config validation stage while deducing isSelf(). + // This can fail with an InterruptedDueToReplStateChange error when interrupted. // We retry three times to reduce the chance of failing this way. assert.retry(() => { var res; @@ -905,10 +906,13 @@ var ReplSetTest = function(opts) { throw e; } - assert.commandFailedWithCode( - res, - [ErrorCodes.NodeNotFound, ErrorCodes.NewReplicaSetConfigurationIncompatible], - "replSetReconfig during initiate failed"); + assert.commandFailedWithCode(res, + [ + ErrorCodes.NodeNotFound, + ErrorCodes.NewReplicaSetConfigurationIncompatible, + ErrorCodes.InterruptedDueToReplStateChange + ], + "replSetReconfig during initiate failed"); return false; }, "replSetReconfig during initiate failed", 3, 5 * 1000); } -- cgit v1.2.1