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%2FTestActorFactory.java;fp=opendaylight%2Fmd-sal%2Fsal-akka-raft%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fraft%2FTestActorFactory.java;h=96f4fe8c6e5172126291ed7358526b403d4a25f2;hb=88a7f904602133bb803752848bb58c9b0a3e9792;hp=50a3c98131a4f06bbde84a5346386d74e379de0e;hpb=9d22b756486b5d249a804494f4d901dcd033c49f;p=controller.git diff --git a/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/TestActorFactory.java b/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/TestActorFactory.java index 50a3c98131..96f4fe8c6e 100644 --- a/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/TestActorFactory.java +++ b/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/TestActorFactory.java @@ -7,6 +7,8 @@ */ package org.opendaylight.controller.cluster.raft; +import static org.junit.Assert.assertTrue; + import akka.actor.Actor; import akka.actor.ActorIdentity; import akka.actor.ActorRef; @@ -23,10 +25,9 @@ import akka.util.Timeout; import com.google.common.base.Stopwatch; import com.google.common.util.concurrent.Uninterruptibles; import java.time.Duration; -import java.util.LinkedList; +import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; -import org.junit.Assert; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import scala.concurrent.Await; @@ -49,7 +50,7 @@ public class TestActorFactory implements AutoCloseable { private static final Logger LOG = LoggerFactory.getLogger(TestActorFactory.class); private final ActorSystem system; - List createdActors = new LinkedList<>(); + private final List createdActors = new ArrayList<>(); private static int actorCount = 1; public TestActorFactory(final ActorSystem system) { @@ -152,7 +153,7 @@ public class TestActorFactory implements AutoCloseable { ActorSelection actorSelection = system.actorSelection(actorRef.path().toString()); Future future = Patterns.ask(actorSelection, new Identify(""), timeout); ActorIdentity reply = (ActorIdentity)Await.result(future, timeout.duration()); - Assert.assertTrue("Identify returned non-present", reply.getActorRef().isPresent()); + assertTrue("Identify returned non-present", reply.getActorRef().isPresent()); return; } catch (Exception | AssertionError e) { Uninterruptibles.sleepUninterruptibly(100, TimeUnit.MILLISECONDS);