He-Pin opened a new pull request, #978:
URL: https://github.com/apache/pekko-http/pull/978

   ## Motivation
   
   The capacity-eviction test in `ExpiringLfuCacheSpec` used a fixed 
`Thread.sleep(50)` to wait for background cache eviction. This is inherently 
racy — it fails on slow CI machines, under GC pressure, or when the JVM is not 
yet warmed up. The upstream fix in akka-http (commit `87c9bdcbc`) replaced the 
hard sleep with a retrying assertion.
   
   ## Modification
   
   Replace `Thread.sleep(50)` with `TestKit.awaitAssert(…, max = 3.seconds, 
interval = 50.millis)` in the LFU cache capacity test so the assertion retries 
automatically until the cache has evicted entries down to the expected size.
   
   Ported from akka-http commit: `87c9bdcbc`
   
   ## Result
   
   No more spurious timing-sensitive test failures in the LFU cache spec on 
loaded or slow CI machines.


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to