Details
Description
01:40:35,536 ERROR (testng-LocalEntryRetrieverEvictionTest:) [UnitTestTestNGListener] Test testExpiredEntryNotReturned(org.infinispan.iteration.LocalEntryRetrieverEvictionTest) failed. java.lang.AssertionError: expected:<{0=0 stay in cache, 1=1 stay in cache, 2=2 stay in cache, 3=3 stay in cache, 4=4 stay in cache}> but was:<{0=0 stay in cache, 1=1 stay in cache, 2=2 stay in cache, expired=this shouldn't be returned, 3=3 stay in cache, 4=4 stay in cache}> at org.testng.AssertJUnit.fail(AssertJUnit.java:59) at org.testng.AssertJUnit.failNotEquals(AssertJUnit.java:364) at org.testng.AssertJUnit.assertEquals(AssertJUnit.java:80) at org.testng.AssertJUnit.assertEquals(AssertJUnit.java:88) at org.infinispan.iteration.BaseEntryRetrieverEvictionTest.testExpiredEntryNotReturned(BaseEntryRetrieverEvictionTest.java:56)
The problem is that the test measures the time expired since before inserting the value, it should measure the time since after inserting the value (actually Thread.sleep() would suffice). Computing the time since before the insert is only useful when check that the entry didn't expire too soon.
I have seen a failure in LocalEntryRetrieverEvictionTest on my machine, but only failures in ReplicatedEntryRetrieverEvictionTest and DistributedEntryRetrieverEvictionTest in CI: