michaelsembwever commented on code in PR #3602:
URL: https://github.com/apache/cassandra/pull/3602#discussion_r1793519257
##########
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:
```suggestion
@Test
public void testDefaultAuthenticateMessage()
{
AuthenticateMessage authenticateMessage =
authenticator.getAuthenticateMessage(null, null);
assertThat(authenticateMessage.authenticator).isEqualTo(PasswordAuthenticator.class.getName());
}
@Test
public void testDefaultSimpleNameAuthenticateMessage()
{
AuthenticateMessage authenticateMessage =
authenticator.getAuthenticateMessage(null, null);
assertThat(authenticateMessage.authenticator).isEqualTo(PasswordAuthenticator.class.getSimpleName());
}
@Test
public void testCustomAuthenticateMessage()
{
AuthenticateMessage authenticateMessage =
authenticator.getAuthenticateMessage(null, null);
assertThat(authenticateMessage.authenticator).isEqualTo(CustomTestPasswordAuthenticator.class.getName());
}
public static class CustomTestPasswordAuthenticator extends
PasswordAuthenticator {}
```
…?
--
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]