Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-14780

Make RefreshingHttpsJwksTest#testSecondaryRefreshAfterElapsedDelay deterministic

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.7.0
    • None
    • None

    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.

      Attachments

        Issue Links

          Activity

            People

              adupriez Alexandre Dupriez
              adupriez Alexandre Dupriez
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: