Fix intermittent failure in testRemoveShardReplica 53/44953/2
authorTom Pantelis <tpanteli@brocade.com>
Wed, 31 Aug 2016 16:48:38 +0000 (12:48 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Thu, 1 Sep 2016 02:56:45 +0000 (02:56 +0000)
This test has failed on jenkins a few times:

java.lang.AssertionError: Shard cars is present
at org.junit.Assert.fail(Assert.java:88)
at org.opendaylight.controller.cluster.datastore.MemberNode.verifyNoShardPresent(MemberNode.java:174)
at org.opendaylight.controller.cluster.datastore.admin.ClusterAdminRpcServiceTest.testRemoveShardReplica(ClusterAdminRpcServiceTest.java:373)

The log output indicates member-2 hadn't re-joined with member-1 yet after it was
restarted. So when RemoveServer was sent to member-1 to remove member-2, it tried to
send the ServerRemoved message to the member-2 shard but it wasn't delivered and thus
the shard wasn't shut down and removed. To alleviate this I added a waitTillReady call
on member-2's config data store to ensure it has synced with the shard leader on
member-1.

Change-Id: I8de9e585998d9f7b2ab8e4fd3f23c1ab222886cc
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>

No differences found