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=0abb121362176baeeeccf16e1d023bd6a945cfe5;hb=88a7f904602133bb803752848bb58c9b0a3e9792;hp=904c7ba5b4b70ddb7ccfd3bb227329f97df5cf3b;hpb=dd79b08b6534e07b9d48057adfa945e8e4e18cc7;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 904c7ba5b4..0abb121362 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 @@ -21,12 +21,10 @@ import akka.testkit.TestActorRef; import akka.testkit.javadsl.TestKit; import akka.util.Timeout; import com.google.common.base.Stopwatch; -import com.google.common.collect.ImmutableMap; import com.google.common.util.concurrent.Uninterruptibles; import java.io.OutputStream; import java.time.Duration; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Optional; @@ -187,7 +185,7 @@ public abstract class AbstractRaftActorIntegrationTest extends AbstractActorTest @Override @SuppressWarnings("checkstyle:IllegalCatch") public void createSnapshot(final ActorRef actorRef, final Optional installSnapshotStream) { - MockSnapshotState snapshotState = new MockSnapshotState(new ArrayList<>(getState())); + MockSnapshotState snapshotState = new MockSnapshotState(List.copyOf(getState())); if (installSnapshotStream.isPresent()) { SerializationUtils.serialize(snapshotState, installSnapshotStream.get()); } @@ -240,10 +238,10 @@ public abstract class AbstractRaftActorIntegrationTest extends AbstractActorTest protected String follower2Id = factory.generateActorId("follower"); protected TestActorRef follower2Actor; protected ActorRef follower2CollectorActor; - protected RaftActorBehavior follower2; + protected RaftActorBehavior follower2; protected RaftActorContext follower2Context; - protected ImmutableMap peerAddresses; + protected Map peerAddresses; protected long initialTerm = 5; protected long currentTerm; @@ -285,7 +283,7 @@ public abstract class AbstractRaftActorIntegrationTest extends AbstractActorTest protected TestActorRef newTestRaftActor(final String id, final Map newPeerAddresses, final ConfigParams configParams) { return newTestRaftActor(id, TestRaftActor.newBuilder().peerAddresses(newPeerAddresses != null - ? newPeerAddresses : Collections.emptyMap()).config(configParams)); + ? newPeerAddresses : Map.of()).config(configParams)); } protected TestActorRef newTestRaftActor(final String id, final TestRaftActor.Builder builder) {