ashwinpankaj commented on code in PR #14888:
URL: https://github.com/apache/kafka/pull/14888#discussion_r1411942462
##########
clients/src/test/java/org/apache/kafka/common/security/oauthbearer/internals/secured/RefreshingHttpsJwksTest.java:
##########
@@ -62,14 +62,14 @@ public class RefreshingHttpsJwksTest extends
OAuthBearerTest {
@Test
public void testBasicScheduleRefresh() throws Exception {
String keyId = "abc123";
- Time time = new MockTime();
+ MockTime time = new MockTime();
HttpsJwks httpsJwks = spyHttpsJwks();
- try (RefreshingHttpsJwks refreshingHttpsJwks =
getRefreshingHttpsJwks(time, httpsJwks)) {
+ try (RefreshingHttpsJwks refreshingHttpsJwks =
getRefreshingHttpsJwks(time, httpsJwks, mockExecutorService(time))) {
Review Comment:
```suggestion
// we use mocktime here to ensure that scheduled refresh _doesn't_
run and update the invocation count
// we expect httpsJwks.refresh() to be invoked twice, once from
init() and maybeExpediteRefresh() each
try (RefreshingHttpsJwks refreshingHttpsJwks =
getRefreshingHttpsJwks(time, httpsJwks, mockExecutorService(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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]