[infinispan-issues] [JBoss JIRA] (ISPN-6293) Registering a clustered listener in a DIST cluster leads to SuspectException if one member is not joined yet

Adrian Nistor (JIRA) issues at jboss.org
Tue Mar 1 06:26:00 EST 2016


Adrian Nistor created ISPN-6293:
-----------------------------------

             Summary: Registering a clustered listener in a DIST cluster leads to SuspectException if one member is not joined yet
                 Key: ISPN-6293
                 URL: https://issues.jboss.org/browse/ISPN-6293
             Project: Infinispan
          Issue Type: Bug
    Affects Versions: 8.2.0.Beta2
            Reporter: Adrian Nistor
            Assignee: William Burns
             Fix For: 8.2.0.Final


Reproducer:
{code}

import org.infinispan.configuration.cache.CacheMode;
import org.infinispan.configuration.cache.ConfigurationBuilder;
import org.infinispan.notifications.Listener;
import org.infinispan.notifications.cachelistener.annotation.CacheEntryCreated;
import org.infinispan.notifications.cachelistener.event.CacheEntryEvent;
import org.infinispan.test.MultipleCacheManagersTest;
import org.testng.annotations.Test;

@Test(groups = "functional", testName = "ClusteredListenerJoinsTest")
public class ClusteredListenerJoinsTest extends MultipleCacheManagersTest {

   @Listener(clustered = true)
   private static final class NoOpListener {

      @CacheEntryCreated
      public void handleEvent(CacheEntryEvent<Object, Object> e) {
      }
   }

   @Override
   protected void createCacheManagers() {
      ConfigurationBuilder c = buildConfiguration();
      createCluster(c, 3);
      waitForClusterToForm();
   }

   private ConfigurationBuilder buildConfiguration() {
      ConfigurationBuilder c = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, false); //unreproducible with CacheMode.REPL_SYNC
      c.clustering().hash().numOwners(2);
      return c;
   }

   public void testJoins() {
      cache(0).addListener(new NoOpListener());

      addClusterEnabledCacheManager(buildConfiguration());
      //waitForClusterToForm();

      cache(0).addListener(new NoOpListener());  //fails most times with SuspectException; uncomment the line above to ensure it does not fail
   }
}
{code}



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the infinispan-issues mailing list