diff options
author | A. Jesse Jiryu Davis <jesse@mongodb.com> | 2018-12-13 22:45:03 -0500 |
---|---|---|
committer | A. Jesse Jiryu Davis <jesse@mongodb.com> | 2019-01-07 22:54:19 -0500 |
commit | dd9be1adf2425c7ddd746ff6da75d564474ebed3 (patch) | |
tree | e00e68373a85a6ead0cbe9a12dc98e51a538f326 /src/mongo/shell | |
parent | 09fdd6cd55bfaca9ac525f6a0668ed97a7f3d048 (diff) | |
download | mongo-dd9be1adf2425c7ddd746ff6da75d564474ebed3.tar.gz |
SERVER-38512 Test that secondary hangs up on w: 0 writes
Diffstat (limited to 'src/mongo/shell')
-rw-r--r-- | src/mongo/shell/assert.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/shell/assert.js b/src/mongo/shell/assert.js index 3b286dc9b70..ce2ec257763 100644 --- a/src/mongo/shell/assert.js +++ b/src/mongo/shell/assert.js @@ -988,5 +988,16 @@ assert = (function() { } }; + assert.includes = function(haystack, needle, msg) { + if (!haystack.includes(needle)) { + var assertMsg = "string [" + haystack + "] does not include [" + needle + "]"; + if (msg) { + assertMsg += ", " + msg; + } + + doassert(assertMsg); + } + }; + return assert; })(); |