diff options
author | Vesselina Ratcheva <vesselina.ratcheva@10gen.com> | 2021-06-14 19:56:52 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-07-25 22:37:44 +0000 |
commit | 1dd2f1ae01d85c27c1ff1b5bfcbe69285bb84010 (patch) | |
tree | dbc9d06fa0035b205c2b973e745e866ba3d0ab24 /src/mongo/shell | |
parent | 49db4064d02edf55ae97114f6a55157596ae91ec (diff) | |
download | mongo-1dd2f1ae01d85c27c1ff1b5bfcbe69285bb84010.tar.gz |
SERVER-56446 Do not reauthenticate in ReplSetTest.restart() if 'waitForConnect=false' is specified
(cherry picked from commit db5ca00459eb05bea982cbf858d2cbdfb1ef221b)
Diffstat (limited to 'src/mongo/shell')
-rw-r--r-- | src/mongo/shell/replsettest.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mongo/shell/replsettest.js b/src/mongo/shell/replsettest.js index be8c6231f96..16f194470a8 100644 --- a/src/mongo/shell/replsettest.js +++ b/src/mongo/shell/replsettest.js @@ -2981,7 +2981,10 @@ var ReplSetTest = function(opts) { var started = this.start(n, options, true, wait); - if (jsTestOptions().keyFile) { + // We should not attempt to reauthenticate the connection if we did not wait for it + // to be reestablished in the first place. + const skipWaitForConnection = (options && options.waitForConnect === false); + if (jsTestOptions().keyFile && !skipWaitForConnection) { if (started.length) { // if n was an array of conns, start will return an array of connections for (var i = 0; i < started.length; i++) { |