summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2018-09-19 13:48:49 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2018-10-19 12:54:16 -0400
commitb91fdee6c7505df98ffa15f9cc370df1ff031b27 (patch)
tree35238538fd463b495ba1716381be915645db0bae
parent64bd01c42e691d4aed64300ff37e38d074477c51 (diff)
downloadmongo-b91fdee6c7505df98ffa15f9cc370df1ff031b27.tar.gz
SERVER-36747 ssl_client_certificate_warning_suppression.js - wait for log message
(cherry picked from commit 4ccfc88d91836d1fa5bbe7868dc2994f66a66a12)
-rw-r--r--jstests/ssl/ssl_client_certificate_warning_suppression.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/jstests/ssl/ssl_client_certificate_warning_suppression.js b/jstests/ssl/ssl_client_certificate_warning_suppression.js
index 4c6fa63128e..f2bbf93e110 100644
--- a/jstests/ssl/ssl_client_certificate_warning_suppression.js
+++ b/jstests/ssl/ssl_client_certificate_warning_suppression.js
@@ -36,6 +36,18 @@ load('jstests/ssl/libs/ssl_helpers.js');
'quit()') === 0;
}, "mongo did not initialize properly");
+ // Keep checking the log file until client metadata is logged since the SSL warning is
+ // logged before it.
+ assert.soon(
+ () => {
+ const log = rawMongoProgramOutput();
+ return log.search('client metadata') !== -1;
+ },
+ "logfile should contain 'client metadata'.\n" +
+ "Log File Contents\n==============================\n" + rawMongoProgramOutput() +
+ "\n==============================\n");
+
+ // Now check for the message
const log = rawMongoProgramOutput();
assert.eq(suppress, log.search('no SSL certificate provided by peer') === -1);