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


##########
pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyAuthenticationTest.java:
##########
@@ -150,9 +151,12 @@ public String authenticate(AuthenticationDataSource 
authData) throws Authenticat
                        long currentTimeInMillis = System.currentTimeMillis();
                        if (expiryTimeInMillis < currentTimeInMillis) {
                                log.warn("Auth failed due to timeout");
-                               throw new 
AuthenticationException("Authentication data has been expired");
+                               return CompletableFuture
+                                               .failedFuture(new 
AuthenticationException("Authentication data has been expired"));
                        }
-                       return element.get("entityType").getAsString();
+                       final String result = 
element.get("entityType").getAsString();

Review Comment:
   It is possible, but unlikely since this class is only used for internal 
pulsar tests.



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