Fix intermittent failure in LeadershipTransferIntegrationTest 98/38298/2
authorTom Pantelis <tpanteli@brocade.com>
Tue, 3 May 2016 00:16:32 +0000 (20:16 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Tue, 3 May 2016 00:25:18 +0000 (20:25 -0400)
testLeaderTransferAborted failed on jenkins b/c the leader happened to
get an AppenEntriesReply from follower2 for an AppendEntries message
that was sent before the test started dropping AppendEntries messages to
cause leadership transfer to fail and abort. I changed the test so it
drops AppendEntriesReply messages on the leader to avoid this.

Change-Id: I8a04b6dd49a9a46f210658afc33ff6001143b615
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/LeadershipTransferIntegrationTest.java

index 28c83db..acffda7 100644 (file)
@@ -28,6 +28,7 @@ import org.opendaylight.controller.cluster.raft.client.messages.GetOnDemandRaftS
 import org.opendaylight.controller.cluster.raft.client.messages.OnDemandRaftState;
 import org.opendaylight.controller.cluster.raft.client.messages.Shutdown;
 import org.opendaylight.controller.cluster.raft.messages.AppendEntries;
+import org.opendaylight.controller.cluster.raft.messages.AppendEntriesReply;
 import org.opendaylight.controller.cluster.raft.utils.MessageCollectorActor;
 import scala.concurrent.Await;
 import scala.concurrent.Future;
@@ -196,8 +197,7 @@ public class LeadershipTransferIntegrationTest extends AbstractRaftActorIntegrat
 
         createRaftActors();
 
-        follower1Actor.underlyingActor().startDropMessages(AppendEntries.class);
-        follower2Actor.underlyingActor().startDropMessages(AppendEntries.class);
+        leaderActor.underlyingActor().startDropMessages(AppendEntriesReply.class);
 
         sendShutDown(leaderActor);
 

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.