michaeljmarshall commented on code in PR #19519:
URL: https://github.com/apache/pulsar/pull/19519#discussion_r1106693259


##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/auth/MockAuthenticationProvider.java:
##########
@@ -65,4 +71,41 @@ public String authenticate(AuthenticationDataSource 
authData) throws Authenticat
                 "Not a valid principle. Should be 
[pass|fail|error].[pass|fail|error], found " + principal);
     }
 
+    @Override
+    public AuthenticationState newAuthState(AuthData authData, SocketAddress 
remoteAddress, SSLSession sslSession)
+            throws AuthenticationException {
+        return new MockAuthState(this);
+    }
+
+    private static class MockAuthState implements AuthenticationState {

Review Comment:
   I used `MockAlwaysExpiredAuthenticationProvider` to test authentication 
refresh because it guaranteed the `ServerCnx` would send the `AuthChallenge` 
command.



-- 
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]

Reply via email to