Flaky JWKSource tests fail intermittently

Issue #508 resolved
Vladimir Dzhuvinov created an issue
JWKSourceUnknownKeysTest.testMultiThreadedKnownAndUnknownKeys:212 expected:<8> but was:<10>

With a Java 17, a lot.

Comments (12)

  1. Vladimir Dzhuvinov reporter
    JWKSourceKeyRotationTest.testMultiThreadedKeyRotation:155 expected:<9> but was:<10>
    

    With the configured Bitbucket pipeline

  2. Vladimir Dzhuvinov reporter

    JWKSourceUnknownKeysTest.testMultiThreadedKnownAndUnknownKeys:212 expected:<8> but was:<11>

    With the configured Bitbucket pipeline

  3. Thomas Rørvik Skjølberg

    Perhaps the Thread.sleep(1000) in runForDuration(..) is a bit long when the cache timings are 2 or 3 seconds?

  4. Thomas Rørvik Skjølberg

    If the tests just run for too long, perhaps because starting all the threads take more time on the CI server, then it might be an idea to time the actual run time and adjust the assertEquals.

  5. Thomas Rørvik Skjølberg

    At least it did not get any worse 🙂
    Were you able to trigger the build multiple times (to check if still flaky)?

  6. Thomas Rørvik Skjølberg

    Sure, that is a good plan. The main point of the tests is not the run time itself, but that multithreading works as expected.

  7. Thomas Rørvik Skjølberg

    Are you able to trigger the build repeatedly? Now one test fails, would be interesting to see whether both still fail.

  8. Log in to comment