Remove explicit default super-constructor calls
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / test / java / org / opendaylight / controller / cluster / raft / AbstractRaftActorIntegrationTest.java
index 5959df768fc6bd3359edfef777331b8bbcc9bb24..9d275e7f310bc0e3d18c74b7574595aaf99a86e5 100644 (file)
@@ -92,7 +92,7 @@ public abstract class AbstractRaftActorIntegrationTest extends AbstractActorTest
 
     public static class TestRaftActor extends MockRaftActor {
 
-        private final TestActorRef<MessageCollectorActor> collectorActor;
+        private final ActorRef collectorActor;
         private final Map<Class<?>, Predicate<?>> dropMessages = new ConcurrentHashMap<>();
 
         private TestRaftActor(Builder builder) {
@@ -131,7 +131,7 @@ public abstract class AbstractRaftActorIntegrationTest extends AbstractActorTest
             }
 
             if (message instanceof SetPeerAddress) {
-                setPeerAddress(((SetPeerAddress) message).getPeerId().toString(),
+                setPeerAddress(((SetPeerAddress) message).getPeerId(),
                         ((SetPeerAddress) message).getPeerAddress());
                 return;
             }
@@ -172,9 +172,9 @@ public abstract class AbstractRaftActorIntegrationTest extends AbstractActorTest
         }
 
         public static class Builder extends AbstractBuilder<Builder, TestRaftActor> {
-            private TestActorRef<MessageCollectorActor> collectorActor;
+            private ActorRef collectorActor;
 
-            public Builder collectorActor(TestActorRef<MessageCollectorActor> newCollectorActor) {
+            public Builder collectorActor(ActorRef newCollectorActor) {
                 this.collectorActor = newCollectorActor;
                 return this;
             }
@@ -216,6 +216,7 @@ public abstract class AbstractRaftActorIntegrationTest extends AbstractActorTest
     protected long currentTerm;
 
     protected int snapshotBatchCount = 4;
+    protected int snapshotChunkSize = SNAPSHOT_CHUNK_SIZE;
 
     protected List<MockPayload> expSnapshotState = new ArrayList<>();
 
@@ -233,7 +234,7 @@ public abstract class AbstractRaftActorIntegrationTest extends AbstractActorTest
         configParams.setSnapshotBatchCount(snapshotBatchCount);
         configParams.setSnapshotDataThresholdPercentage(70);
         configParams.setIsolatedLeaderCheckInterval(new FiniteDuration(1, TimeUnit.DAYS));
-        configParams.setSnapshotChunkSize(SNAPSHOT_CHUNK_SIZE);
+        configParams.setSnapshotChunkSize(snapshotChunkSize);
         return configParams;
     }
 
@@ -255,9 +256,8 @@ public abstract class AbstractRaftActorIntegrationTest extends AbstractActorTest
     }
 
     protected TestActorRef<TestRaftActor> newTestRaftActor(String id, TestRaftActor.Builder builder) {
-        builder.collectorActor(factory.<MessageCollectorActor>createTestActor(
-                MessageCollectorActor.props().withDispatcher(Dispatchers.DefaultDispatcherId()),
-                        factory.generateActorId(id + "-collector"))).id(id);
+        builder.collectorActor(factory.createActor(
+                MessageCollectorActor.props(), factory.generateActorId(id + "-collector"))).id(id);
 
         InvalidActorNameException lastEx = null;
         for (int i = 0; i < 10; i++) {