X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2FIsolationScenarioTest.java;h=471ea375899487b3aea1b46f916c7e001c316d04;hb=f33beecf2a10955a9219757529ba3017079816cc;hp=fb810e3aeb9046245c470d2ddc86900da0fd8fd3;hpb=341a9dd5ff4c596aada3a0c1fa58c17c50d7521f;p=controller.git diff --git a/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/IsolationScenarioTest.java b/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/IsolationScenarioTest.java index fb810e3aeb..471ea37589 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/IsolationScenarioTest.java +++ b/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/IsolationScenarioTest.java @@ -15,10 +15,7 @@ import static org.opendaylight.controller.cluster.raft.utils.MessageCollectorAct import static org.opendaylight.controller.cluster.raft.utils.MessageCollectorActor.expectMatching; import static org.opendaylight.controller.cluster.raft.utils.MessageCollectorActor.getAllMatching; -import akka.actor.Actor; import akka.actor.ActorRef; -import akka.actor.Props; -import akka.testkit.TestActorRef; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import java.util.List; @@ -41,8 +38,8 @@ import scala.concurrent.duration.FiniteDuration; * @author Thomas Pantelis */ public class IsolationScenarioTest extends AbstractRaftActorIntegrationTest { - private TestActorRef follower1NotifierActor; - private TestActorRef leaderNotifierActor; + private ActorRef follower1NotifierActor; + private ActorRef leaderNotifierActor; /** * Isolates the leader after all initial payload entries have been committed and applied on all nodes. While @@ -51,7 +48,7 @@ public class IsolationScenarioTest extends AbstractRaftActorIntegrationTest { * appropriately. */ @Test - public void testLeaderIsolationWithAllPriorEntriesCommitted() throws Exception { + public void testLeaderIsolationWithAllPriorEntriesCommitted() { testLog.info("testLeaderIsolationWithAllPriorEntriesCommitted starting"); createRaftActors(); @@ -136,7 +133,7 @@ public class IsolationScenarioTest extends AbstractRaftActorIntegrationTest { * sides should reconcile their logs appropriately. */ @Test - public void testLeaderIsolationWithPriorUncommittedEntryAndOneConflictingEntry() throws Exception { + public void testLeaderIsolationWithPriorUncommittedEntryAndOneConflictingEntry() { testLog.info("testLeaderIsolationWithPriorUncommittedEntryAndOneConflictingEntry starting"); createRaftActors(); @@ -257,7 +254,7 @@ public class IsolationScenarioTest extends AbstractRaftActorIntegrationTest { * and both sides should reconcile their logs appropriately. */ @Test - public void testLeaderIsolationWithPriorUncommittedEntryAndMultipleConflictingEntries() throws Exception { + public void testLeaderIsolationWithPriorUncommittedEntryAndMultipleConflictingEntries() { testLog.info("testLeaderIsolationWithPriorUncommittedEntryAndMultipleConflictingEntries starting"); createRaftActors(); @@ -424,7 +421,7 @@ public class IsolationScenarioTest extends AbstractRaftActorIntegrationTest { private void createRaftActors() { testLog.info("createRaftActors starting"); - follower1NotifierActor = factory.createTestActor(Props.create(MessageCollectorActor.class), + follower1NotifierActor = factory.createActor(MessageCollectorActor.props(), factory.generateActorId(follower1Id + "-notifier")); DefaultConfigParamsImpl followerConfigParams = new DefaultConfigParamsImpl(); @@ -444,7 +441,7 @@ public class IsolationScenarioTest extends AbstractRaftActorIntegrationTest { leaderConfigParams = newLeaderConfigParams(); leaderConfigParams.setIsolatedLeaderCheckInterval(new FiniteDuration(500, TimeUnit.MILLISECONDS)); - leaderNotifierActor = factory.createTestActor(Props.create(MessageCollectorActor.class), + leaderNotifierActor = factory.createActor(MessageCollectorActor.props(), factory.generateActorId(leaderId + "-notifier")); leaderActor = newTestRaftActor(leaderId, TestRaftActor.newBuilder().peerAddresses(peerAddresses)