splett2 commented on code in PR #14888: URL: https://github.com/apache/kafka/pull/14888#discussion_r1412729044
########## 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: this code was not changed. I just inserted the new `mockExecutorService` method in a way that generated a weird diff. note that the assertions here are the same as the ones that were "removed" from lines 159-168. -- 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