ExpiringLfuCacheSpec: should properly limit capacity
https://github.com/akka/akka-http/runs/4393893232?check_suite_focus=true
[info] - should properly limit capacity *** FAILED *** (83 milliseconds)
[info] 4 was not equal to 3 (ExpiringLfuCacheSpec.scala:115)
[info] org.scalatest.exceptions.TestFailedException:
[info] at org.scalatest.matchers.MatchersHelper$.indicateFailure(MatchersHelper.scala:344)
[info] at org.scalatest.matchers.should.Matchers$ShouldMethodHelperClass.shouldMatcher(Matchers.scala:6778)
[info] at org.scalatest.matchers.should.Matchers$AnyShouldWrapper.should(Matchers.scala:6822)
[info] at akka.http.caching.ExpiringLfuCacheSpec.$anonfun$new$20(ExpiringLfuCacheSpec.scala:115)
https://github.com/akka/akka-http/runs/5713734725?check_suite_focus=true
https://github.com/akka/akka-http/runs/6362762905?check_suite_focus=true#step:7:2272
https://github.com/akka/akka-http/blob/83f44a79fa2634573c75df642f7b9f109875f09a/akka-http-caching/src/test/scala/akka/http/caching/ExpiringLfuCacheSpec.scala#L114-L115
That is racy, consider awaiting until the size matches within a tolerance period. Otherwise consider using a same thread executor so that evictions are not async in the tests.
That is racy, consider awaiting until the size matches within a tolerance period. Otherwise consider using a same thread executor so that evictions are not async in the tests.
Good to know. Thanks for chiming in.
https://github.com/akka/akka-http/actions/runs/3834627463/jobs/6527188551#step:7:2303