diff options
author | Matthew Russotto <matthew.russotto@mongodb.com> | 2022-04-01 13:05:55 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-04-04 14:45:49 +0000 |
commit | 381e4ecfa942fdc06a50875505c1e900bae75653 (patch) | |
tree | 5d35389deb6c9bb8d66289d8c0ce7dca44b57967 | |
parent | e44576384c3ed73e60f5e40b128df38ddb6ac981 (diff) | |
download | mongo-381e4ecfa942fdc06a50875505c1e900bae75653.tar.gz |
SERVER-65181 x509_cluster_auth_rollover must allow for rollback after restart
-rw-r--r-- | jstests/sslSpecial/x509_cluster_auth_rollover.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/jstests/sslSpecial/x509_cluster_auth_rollover.js b/jstests/sslSpecial/x509_cluster_auth_rollover.js index 993eb64f36b..06ce3c1653b 100644 --- a/jstests/sslSpecial/x509_cluster_auth_rollover.js +++ b/jstests/sslSpecial/x509_cluster_auth_rollover.js @@ -48,7 +48,14 @@ const rolloverConfig = function(newConfig) { rst.nodeOptions[configId] = Object.merge(rst.nodeOptions[configId], newConfig, true); const newNode = rst.start(nodeId, {}, true, true); rst.awaitSecondaryNodes(); - assert(newNode.getDB("admin").auth("root", "root")); + // Even though we waited for this node to become SECONDARY, it may go into rollback + // thereafter, so this auth command must be tolerant of that disconnection. + let authResult; + assert.soonNoExcept(function() { + authResult = newNode.getDB("admin").auth("root", "root"); + return true; + }); + assert(authResult); }; rst.nodes.forEach(function(node) { |