Remove DelegatingRaftActorBehavior
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / test / java / org / opendaylight / controller / cluster / raft / behaviors / PartitionedLeadersElectionScenarioTest.java
index 9ad526cadbc413e09b93195e5a4d48df4e93d3fa..11cc1f0a6d87b70f49ba8482431dae46ca08555e 100644 (file)
@@ -159,7 +159,7 @@ public class PartitionedLeadersElectionScenarioTest extends AbstractLeaderElecti
         member3Actor.dropMessagesToBehavior(AppendEntries.class);
         member3Actor.dropMessagesToBehavior(RequestVote.class);
 
-        member2ActorRef.tell(new ElectionTimeout(), ActorRef.noSender());
+        member2ActorRef.tell(ElectionTimeout.INSTANCE, ActorRef.noSender());
 
         member2Actor.waitForExpectedMessages(RequestVoteReply.class);
 
@@ -207,7 +207,7 @@ public class PartitionedLeadersElectionScenarioTest extends AbstractLeaderElecti
         member3Actor.expectMessageClass(RequestVoteReply.class, 1);
         member3Actor.expectMessageClass(AppendEntriesReply.class, 1);
 
-        member3ActorRef.tell(new ElectionTimeout(), ActorRef.noSender());
+        member3ActorRef.tell(ElectionTimeout.INSTANCE, ActorRef.noSender());
 
         member1Actor.waitForExpectedMessages(RequestVote.class);
         member2Actor.waitForExpectedMessages(RequestVote.class);
@@ -251,7 +251,7 @@ public class PartitionedLeadersElectionScenarioTest extends AbstractLeaderElecti
 
         member3Actor.dropMessagesToBehavior(RequestVote.class);
 
-        member2ActorRef.tell(new ElectionTimeout(), ActorRef.noSender());
+        member2ActorRef.tell(ElectionTimeout.INSTANCE, ActorRef.noSender());
 
         member1Actor.waitForExpectedMessages(RequestVote.class);
         member3Actor.waitForExpectedMessages(RequestVote.class);
@@ -286,8 +286,8 @@ public class PartitionedLeadersElectionScenarioTest extends AbstractLeaderElecti
         DefaultConfigParamsImpl member2ConfigParams = newConfigParams();
         member2Context.setConfigParams(member2ConfigParams);
 
-        Follower member2Behavior = new Follower(member2Context);
-        member2Actor.behavior = member2Behavior;
+        member2Actor.behavior = new Follower(member2Context);
+        member2Context.setCurrentBehavior(member2Actor.behavior);
 
         // Create member 3's behavior initially as Follower
 
@@ -299,8 +299,8 @@ public class PartitionedLeadersElectionScenarioTest extends AbstractLeaderElecti
         DefaultConfigParamsImpl member3ConfigParams = newConfigParams();
         member3Context.setConfigParams(member3ConfigParams);
 
-        Follower member3Behavior = new Follower(member3Context);
-        member3Actor.behavior = member3Behavior;
+        member3Actor.behavior = new Follower(member3Context);
+        member3Context.setCurrentBehavior(member3Actor.behavior);
 
         // Create member 1's behavior initially as Leader