]
Tristan Tarrant updated ISPN-7026:
----------------------------------
Fix Version/s: 9.1.0.Final
(was: 9.0.0.Final)
CacheClusterJoinTest.testIsCoordinator random failures
------------------------------------------------------
Key: ISPN-7026
URL:
https://issues.jboss.org/browse/ISPN-7026
Project: Infinispan
Issue Type: Bug
Components: Core, Test Suite - Core
Affects Versions: 9.0.0.Alpha4
Reporter: Dan Berindei
Assignee: Dan Berindei
Labels: testsuite_stability
Fix For: 9.1.0.Final
{{CacheClusterJoinTest.testIsCoordinator}} assumes that once {{JGroupsTransport}}
received a view, {{JGroupsTransport.isCoordinator()}} returns the correct value.
However, only {{JGroupsTransfer.viewAccepted}} is synchronized, {{isCoordinator()}} is
not, so the main thread can see {{isCoordinator() == false}} even after
{{getMembers().get(0) == self}}.
{noformat}
19:32:27,555 DEBUG (Incoming-1,Test-NodeD-36891:[]) [JGroupsTransport] New view accepted:
[Test-NodeD-36891|2] (1) [Test-NodeD-36891]
19:32:27,556 ERROR (testng-Test:[]) [TestSuiteProgress] Test failed:
org.infinispan.api.CacheClusterJoinTest.testIsCoordinator
java.lang.AssertionError
at
org.infinispan.api.CacheClusterJoinTest.testIsCoordinator(CacheClusterJoinTest.java:65)
~[test-classes/:?]
19:32:27,555 DEBUG (Incoming-1,Test-NodeD-36891:[]) [JGroupsTransport] Joined: [], Left:
[Test-NodeC-35712]
{noformat}
It would be nice if {{isCoordinator()}}, {{getCoordinator()}}, and {{getMembers()}} were
more in sync, even though the view can always change between two calls. The simplest way
to do this would be to implement {{isCoordinator()}} and {{getCoordinator()}} on top of
{{getMembers()}} and remove their fields, since they're not use in
performance-sensitive code.