diff options
author | Louis Williams <louis.williams@mongodb.com> | 2018-02-02 17:35:30 -0500 |
---|---|---|
committer | Louis Williams <louis.williams@mongodb.com> | 2018-03-01 11:17:53 -0500 |
commit | 7d7969eb7439b08207e29437e94fc1db5459c205 (patch) | |
tree | f33b98b63c5f3b38fc51f0eed5695267660c3033 /src/mongo/shell/replsettest.js | |
parent | db6e903221712585f830cacead3269a0fbf44f1b (diff) | |
download | mongo-7d7969eb7439b08207e29437e94fc1db5459c205.tar.gz |
SERVER-32638: Allow lock acquisition to be interruptable
Diffstat (limited to 'src/mongo/shell/replsettest.js')
-rw-r--r-- | src/mongo/shell/replsettest.js | 12 |
1 files changed, 8 insertions, 4 deletions
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); } |