Fix intermittent failure in ClusterAdminRpcServiceTest
testRemoveShardLeaderReplica(org.opendaylight.controller.cluster.datastore.admin.ClusterAdminRpcServiceTest)
Time elapsed: 8.187 sec <<< FAILURE!
java.lang.AssertionError: Leader Id
Expected: (a string containing "member-2" or a string containing
"member-3")
but: was "member-1-shard-cars-config_testRemoveShardLeaderReplica"
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
at org.junit.Assert.assertThat(Assert.java:865)
at
org.opendaylight.controller.cluster.datastore.admin.ClusterAdminRpcServiceTest$2.verify(ClusterAdminRpcServiceTest.java:412)
at
org.opendaylight.controller.cluster.datastore.MemberNode.verifyRaftState(MemberNode.java:140)
at
org.opendaylight.controller.cluster.datastore.admin.ClusterAdminRpcServiceTest.testRemoveShardLeaderReplica(ClusterAdminRpcServiceTest.java:409)
member3 tried to become leader but hadn't gotten MemberUp for member2
yet so it didn't have its address when it sent out RequestVote. The
verification of new leader timed out before it coild try again. The call
to waitForMembersUp on line 397 should be for replica3 and not replica2.
Change-Id: I3a714c91ba974b16b2c310027b09f9658915a639
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>