-
Bug
-
Resolution: Done
-
Major
-
8.2.0.Beta2
-
None
-
None
Reproducer:
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 } }