]
William Burns reopened ISPN-5028:
---------------------------------
The fix was correct, however the addition of parkUntil means the test could wait for an
extremely long time. Thinking it might be easier to just call the Thread.sleep(int, long)
method and pass in the long instead? WDYT?
BaseEntryRetrieverEvictionTest.testExpiredEntryNotReturned random
failures
--------------------------------------------------------------------------
Key: ISPN-5028
URL:
https://issues.jboss.org/browse/ISPN-5028
Project: Infinispan
Issue Type: Bug
Reporter: Dan Berindei
Assignee: Dan Berindei
Priority: Blocker
Labels: testsuite_stability
Fix For: 7.1.0.Beta1
{noformat}
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)
{noformat}
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:
http://ci.infinispan.org/viewLog.html?buildId=14438&tab=buildResultsD...
http://ci.infinispan.org/viewLog.html?buildId=14568&tab=buildResultsD...