tiagomlalves commented on code in PR #3602:
URL: https://github.com/apache/cassandra/pull/3602#discussion_r1793556765
##########
test/unit/org/apache/cassandra/auth/PasswordAuthenticatorTest.java:
##########
@@ -198,4 +200,11 @@ public void warmCacheWithEmptyTable()
Map<String, String> cacheEntries = authenticator.bulkLoader().get();
assertTrue(cacheEntries.isEmpty());
}
+
+ @Test
+ public void testDefaultAuthenticateMessage()
+ {
+ AuthenticateMessage authenticateMessage =
authenticator.getAuthenticateMessage(null, null);
+
assertThat(authenticateMessage.authenticator).isEqualTo(PasswordAuthenticator.class.getName());
+ }
Review Comment:
The second test, using `PasswordAuthenticator.class.getSimpleName()` is not
accurate.
The fact that we're able to use a short-form in the configuration,
internally we should always send the FQCN (which is also what the drivers
expect).
The third test is valuable. If we strictly required such test, we should do
it outside of the `PasswordAuthenticatorTest` as this is functionality not
related with `PasswordAuthenticator` but with `IAuthenticator` implementations
in general (we could have a simpler unit test instead of `CQLTester`).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]