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

ClusterListenerReplTest.testPrimaryOwnerGoesDownAfterBackupRaisesEvent random failures

XMLWordPrintable

      Because the cache is replicated, both cache 0 or cache 2 are backup owners of the tested key, and both of them can become primary owners after cache 1 is killed. If cache 0 becomes the primary owner, cache.put(key, FIRST_VALUE) may return null and/or the cluster listener may receive only one event:

      java.lang.AssertionError: expected:<null> but was:<first-value>
          at org.testng.AssertJUnit.assertEquals(AssertJUnit.java:101)
          at org.testng.AssertJUnit.assertEquals(AssertJUnit.java:108)
          at org.infinispan.notifications.cachelistener.cluster.ClusterListenerReplTest.testPrimaryOwnerGoesDownAfterBackupRaisesEvent(ClusterListenerReplTest.java:119)
      
      12:23:53,438 ERROR (testng-ClusterListenerReplTest:) [UnitTestTestNGListener] Test testPrimaryOwnerGoesDownAfterBackupRaisesEvent(org.infinispan.notifications.cachelistener.cluster.ClusterListenerReplTest) failed.java.lang.AssertionError: expected:<1> but was:<2>
      	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:245)
      	at org.testng.AssertJUnit.assertEquals(AssertJUnit.java:252)
      	at org.infinispan.notifications.cachelistener.cluster.ClusterListenerReplTest.testPrimaryOwnerGoesDownAfterBackupRaisesEvent(ClusterListenerReplTest.java:121)
      

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

              Created:
              Updated:
              Resolved: