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

Merge policy tests random failures with ArrayIndexOutOfBoundsException

    XMLWordPrintable

Details

    Description

      BaseMergePolicyTest.getCacheFromPreferredPartition() reads the cache status of all the running caches, including the CONFIG cache, but assumes a 1-to-1 mapping between the responses list and the input caches (the default cache on each node).

      Depending on how the responses are ordered, it may try to return a cache that doesn't exist in the input array:

      10:47:41,378 ERROR (testng-Test:[]) [TestSuiteProgress] Test failed: org.infinispan.conflict.impl.MergePolicyRemoveAllTest.testPartitionMergePolicy[DIST_SYNC, 5N]
      java.lang.ArrayIndexOutOfBoundsException: 8
      	at org.infinispan.conflict.impl.BaseMergePolicyTest.getCacheFromPreferredPartition(BaseMergePolicyTest.java:190) ~[test-classes/:?]
      	at org.infinispan.conflict.impl.BaseMergePolicyTest.getCacheFromPreferredPartition(BaseMergePolicyTest.java:153) ~[test-classes/:?]
      	at org.infinispan.conflict.impl.BaseMergePolicyTest.testPartitionMergePolicy(BaseMergePolicyTest.java:124) ~[test-classes/:?]
      
      16:57:12,012 ERROR (testng-Test:[]) [TestSuiteProgress] Test failed: org.infinispan.conflict.impl.MergePolicyCustomTest.testPartitionMergePolicy[DIST_SYNC, 4N]
      java.lang.ArrayIndexOutOfBoundsException: 6
      	at org.infinispan.conflict.impl.BaseMergePolicyTest.getCacheFromPreferredPartition(BaseMergePolicyTest.java:190) ~[test-classes/:?]
      	at org.infinispan.conflict.impl.BaseMergePolicyTest.getCacheFromPreferredPartition(BaseMergePolicyTest.java:153) ~[test-classes/:?]
      	at org.infinispan.conflict.impl.BaseMergePolicyTest.testPartitionMergePolicy(BaseMergePolicyTest.java:124) ~[test-classes/:?]
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: