Improve segmented journal actor metrics
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / test / java / org / opendaylight / controller / cluster / raft / IsolationScenarioTest.java
index fb810e3aeb9046245c470d2ddc86900da0fd8fd3..471ea375899487b3aea1b46f916c7e001c316d04 100644 (file)
@@ -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<Actor> follower1NotifierActor;
-    private TestActorRef<Actor> 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)