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

End invalidation messages lingering from previous Hibernate Cache tests

    XMLWordPrintable

Details

    Description

      While trying to replicate size related failures in ISPN-8206, I've discovered some put from load calls do not always succeed, e.g.

      [ERROR] Tests run: 144, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 20.959 s <<< FAILURE! - in org.infinispan.test.hibernate.cache.collection.CollectionRegionAccessStrategyTest
      [ERROR] testRemoveAll[Non-JTA, INVALIDATION_SYNC,AccessType[transactional]](org.infinispan.test.hibernate.cache.collection.CollectionRegionAccessStrategyTest)  Time elapsed: 0.017 s  <<< FAILURE!
      java.lang.AssertionError
      	at org.junit.Assert.fail(Assert.java:86)
      	at org.junit.Assert.assertTrue(Assert.java:41)
      	at org.junit.Assert.assertTrue(Assert.java:52)
      	at org.infinispan.test.hibernate.cache.AbstractRegionAccessStrategyTest.evictOrRemoveAllTest(AbstractRegionAccessStrategyTest.Java:557)
      	at org.infinispan.test.hibernate.cache.AbstractRegionAccessStrategyTest.testRemoveAll(AbstractRegionAccessStrategyTest.java:438)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      	at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:45)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      	at org.infinispan.test.hibernate.cache.util.InfinispanTestingSetup$1.evaluate(InfinispanTestingSetup.java:38)
      	at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)
      

      The reason these sometimes fails is because previously running tests, e.g. testRemove, are not waiting for end invalidation message to be consumed before finishing the test. As a result of this, an end invalidation from an earlier test can be left lingering and can trigger a latch that should only be triggered by an end invalidation message within the test itself.

      Attachments

        Issue Links

          Activity

            People

              rh-ee-galder Galder ZamarreƱo
              rh-ee-galder Galder ZamarreƱo
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: