Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-5028

BaseEntryRetrieverEvictionTest.testExpiredEntryNotReturned random failures

    XMLWordPrintable

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:

      http://ci.infinispan.org/viewLog.html?buildId=14438&tab=buildResultsDiv&buildTypeId=Infinispan_MasterHotspotJdk7Fast#testNameId-666977883968506102

      http://ci.infinispan.org/viewLog.html?buildId=14568&tab=buildResultsDiv&buildTypeId=Infinispan_MasterHotspotJdk8#testNameId-8216937438846476729

      Attachments

        Activity

          People

            dberinde@redhat.com Dan Berindei (Inactive)
            dberinde@redhat.com Dan Berindei (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: