[ 
https://issues.apache.org/jira/browse/KAFKA-14780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alexandre Dupriez updated KAFKA-14780:
--------------------------------------
    Description: 
The test {{RefreshingHttpsJwksTest#testSecondaryRefreshAfterElapsedDelay}} 
relies on the actual system clock which makes it frequently fail on my poor 
intellij setup.

 

The {{{}RefreshingHttpsJwks{}}}`component creates and uses a scheduled executor 
service. We could expose the scheduling mechanism to be able to mock its 
behaviour. One way to do could be to use the `KafkaScheduler` which has a 
{{MockScheduler}} implementation which relies on {{MockTime}} instead of the 
real time clock.

  was:
The test `RefreshingHttpsJwksTest#testSecondaryRefreshAfterElapsedDelay` relies 
on the actual system clock which makes it frequently fail on my poor intellij 
setup.

 

The `RefreshingHttpsJwks` component creates and uses a scheduled executor 
service. We could expose the scheduling mechanism to be able to mock its 
behaviour. One way to do could be to use the `KafkaScheduler` which has a 
`MockScheduler` implementation which relies on `MockTime` instead of the real 
time clock.


> Make RefreshingHttpsJwksTest#testSecondaryRefreshAfterElapsedDelay 
> deterministic
> --------------------------------------------------------------------------------
>
>                 Key: KAFKA-14780
>                 URL: https://issues.apache.org/jira/browse/KAFKA-14780
>             Project: Kafka
>          Issue Type: Test
>            Reporter: Alexandre Dupriez
>            Priority: Minor
>
> The test {{RefreshingHttpsJwksTest#testSecondaryRefreshAfterElapsedDelay}} 
> relies on the actual system clock which makes it frequently fail on my poor 
> intellij setup.
>  
> The {{{}RefreshingHttpsJwks{}}}`component creates and uses a scheduled 
> executor service. We could expose the scheduling mechanism to be able to mock 
> its behaviour. One way to do could be to use the `KafkaScheduler` which has a 
> {{MockScheduler}} implementation which relies on {{MockTime}} instead of the 
> real time clock.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to