diff options
author | Erwin Pe <erwin.pe@mongodb.com> | 2021-10-29 17:07:38 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-10-29 17:30:19 +0000 |
commit | 650e442154e12eb2631504c1c9e9059ceae1f7b3 (patch) | |
tree | e0215c3276f979b6d86f7554407f93b1b7599d0d /src | |
parent | f67e98440c7785331f3d4007d4a4864ab611613b (diff) | |
download | mongo-650e442154e12eb2631504c1c9e9059ceae1f7b3.tar.gz |
SERVER-60363 Make assertion for amount of retries in ocsp_retry_backoffs less specific
(cherry picked from commit df815b97b49dd4385299447a880df6f6a66bffb0)
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/shell/check_log.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mongo/shell/check_log.js b/src/mongo/shell/check_log.js index fe2712e9d9d..fc74d871cc1 100644 --- a/src/mongo/shell/check_log.js +++ b/src/mongo/shell/check_log.js @@ -121,6 +121,18 @@ checkLog = (function() { }; /* + * Similar to checkContainsWithCountJson, but checks whether there are at least 'expectedCount' + * instances of 'id' in the logs. + */ + const checkContainsWithAtLeastCountJson = function( + conn, id, attrsDict, expectedCount, severity = null, isRelaxed = false, context = null) { + return checkContainsWithCountJson( + conn, id, attrsDict, expectedCount, severity, isRelaxed, (actual, expected) => { + return actual >= expected; + }, context); + }; + + /* * Calls the 'getLog' function on the provided connection 'conn' to see if a log with the * provided id is found in the logs. If the id is found it looks up the specified attrribute by * attrName and checks if the msg is found in its value. Note: this function does not throw an @@ -401,6 +413,7 @@ checkLog = (function() { checkContainsOnce: checkContainsOnce, checkContainsOnceJson: checkContainsOnceJson, checkContainsWithCountJson: checkContainsWithCountJson, + checkContainsWithAtLeastCountJson: checkContainsWithAtLeastCountJson, checkContainsOnceJsonStringMatch: checkContainsOnceJsonStringMatch, contains: contains, containsJson: containsJson, |