diff options
Diffstat (limited to 'jstests/replsets')
-rw-r--r-- | jstests/replsets/initial_sync_unsupported_auth_schema.js | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/jstests/replsets/initial_sync_unsupported_auth_schema.js b/jstests/replsets/initial_sync_unsupported_auth_schema.js index e27d25aaac0..b8739f5e2a4 100644 --- a/jstests/replsets/initial_sync_unsupported_auth_schema.js +++ b/jstests/replsets/initial_sync_unsupported_auth_schema.js @@ -45,15 +45,23 @@ function testInitialSyncAbortsWithUnsupportedAuthSchema(schema) { msg = /During initial sync, found malformed auth schema version/; } + print("**** Looking for string in logs: " + msg); + var assertFn = function() { - return rawMongoProgramOutput().match(msg); + var foundMatch = rawMongoProgramOutput().match(msg); + if (foundMatch) { + print("***** found matching string in log: " + msg); + } + return foundMatch; }; assert.soon(assertFn, 'Initial sync should have aborted due to an invalid or unsupported' + ' authSchema version: ' + tojson(schema), 60000); - rst.stopSet(undefined, undefined, {allowedExitCodes: [MongoRunner.EXIT_ABRUPT]}); + rst.stopSet(undefined, + undefined, + {allowedExitCodes: [MongoRunner.EXIT_ABRUPT, MongoRunner.EXIT_ABORT]}); } function testInitialSyncAbortsWithExistingUserAndNoAuthSchema() { @@ -78,8 +86,15 @@ function testInitialSyncAbortsWithExistingUserAndNoAuthSchema() { checkedReInitiate(rst); var msg = /During initial sync, found documents in admin\.system\.users/; + + print("**** Looking for string in logs: " + msg); + var assertFn = function() { - return rawMongoProgramOutput().match(msg); + var foundMatch = rawMongoProgramOutput().match(msg); + if (foundMatch) { + print("***** found matching string in log: " + msg); + } + return foundMatch; }; assert.soon(assertFn, @@ -87,7 +102,9 @@ function testInitialSyncAbortsWithExistingUserAndNoAuthSchema() { ' a missing auth schema', 60000); - rst.stopSet(undefined, undefined, {allowedExitCodes: [MongoRunner.EXIT_ABRUPT]}); + rst.stopSet(undefined, + undefined, + {allowedExitCodes: [MongoRunner.EXIT_ABRUPT, MongoRunner.EXIT_ABORT]}); } testInitialSyncAbortsWithUnsupportedAuthSchema({_id: 'authSchema'}); |