jolshan commented on code in PR #14888: URL: https://github.com/apache/kafka/pull/14888#discussion_r1414267284
########## clients/src/test/java/org/apache/kafka/common/security/oauthbearer/internals/secured/RefreshingHttpsJwksTest.java: ########## @@ -134,6 +136,20 @@ public void testSecondaryRefreshAfterElapsedDelay() throws Exception { String keyId = "abc123"; MockTime time = new MockTime(); HttpsJwks httpsJwks = spyHttpsJwks(); + + try (RefreshingHttpsJwks refreshingHttpsJwks = getRefreshingHttpsJwks(time, httpsJwks, mockExecutorService(time))) { + refreshingHttpsJwks.init(); + // We refresh once at the initialization time from getJsonWebKeys. + verify(httpsJwks, times(1)).refresh(); + assertTrue(refreshingHttpsJwks.maybeExpediteRefresh(keyId)); + verify(httpsJwks, times(2)).refresh(); + time.sleep(REFRESH_MS + 1); Review Comment: Ah -- I saw Time time removed and assumed we were using real time. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org