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%2FAbstractRaftActorIntegrationTest.java;h=9d275e7f310bc0e3d18c74b7574595aaf99a86e5;hb=6dbf8f82cfa9fe8c35e4085213a55cb887cc3aee;hp=5959df768fc6bd3359edfef777331b8bbcc9bb24;hpb=51bf6c7493843ad23f074930b56925162732a8b2;p=controller.git diff --git a/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/AbstractRaftActorIntegrationTest.java b/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/AbstractRaftActorIntegrationTest.java index 5959df768f..9d275e7f31 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/AbstractRaftActorIntegrationTest.java +++ b/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/AbstractRaftActorIntegrationTest.java @@ -92,7 +92,7 @@ public abstract class AbstractRaftActorIntegrationTest extends AbstractActorTest public static class TestRaftActor extends MockRaftActor { - private final TestActorRef collectorActor; + private final ActorRef collectorActor; private final Map, 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 { - private TestActorRef collectorActor; + private ActorRef collectorActor; - public Builder collectorActor(TestActorRef 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 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 newTestRaftActor(String id, TestRaftActor.Builder builder) { - builder.collectorActor(factory.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++) {