summaryrefslogtreecommitdiff
path: root/jstests/auth/speculative-auth-replset.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/auth/speculative-auth-replset.js')
-rw-r--r--jstests/auth/speculative-auth-replset.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/jstests/auth/speculative-auth-replset.js b/jstests/auth/speculative-auth-replset.js
index 9f36444a020..3bd960780d6 100644
--- a/jstests/auth/speculative-auth-replset.js
+++ b/jstests/auth/speculative-auth-replset.js
@@ -27,8 +27,9 @@ function countAuthInLog(conn) {
}
} else if (entry.id === kAuthenticationFailedLogId) {
// Authentication can fail legitimately because the secondary abandons the connection
- // during shutdown.
- assert.eq(entry.attr.error.code, ErrorCodes.AuthenticationAbandoned);
+ // during shutdown - if we do encounter an authentication failure in the log, make sure
+ // that it is only of this type, fail anything else
+ assert.eq(entry.attr.result, ErrorCodes.AuthenticationAbandoned);
} else {
// Irrelevant.
return;