X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FAbstractTest.java;h=a3726e270bea47a1ad4b840e20ab14b6b5753709;hb=9905bf0575ff196a531eb114e89b1bdb7226bc6c;hp=790c5c7ea05fab0c18586e72857e3466123c630c;hpb=aeabc9205320987968f20f19119b2591ac6c8d6a;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractTest.java index 790c5c7ea0..a3726e270b 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractTest.java @@ -8,7 +8,7 @@ package org.opendaylight.controller.cluster.datastore; import akka.actor.ActorSystem; -import akka.testkit.JavaTestKit; +import akka.testkit.javadsl.TestKit; import com.typesafe.config.ConfigFactory; import java.util.ArrayList; import java.util.Collection; @@ -23,7 +23,7 @@ import org.opendaylight.controller.cluster.access.concepts.MemberName; import org.opendaylight.controller.cluster.access.concepts.TransactionIdentifier; import scala.compat.java8.FutureConverters; import scala.concurrent.Await; -import scala.concurrent.duration.Duration; +import scala.concurrent.duration.FiniteDuration; public abstract class AbstractTest { protected static final MemberName MEMBER_NAME = MemberName.forName("member-1"); @@ -53,7 +53,7 @@ public abstract class AbstractTest { return new LocalHistoryIdentifier(CLIENT_ID, HISTORY_COUNTER.incrementAndGet()); } - protected static T waitOnAsyncTask(final CompletionStage completionStage, final Duration timeout) + protected static T waitOnAsyncTask(final CompletionStage completionStage, final FiniteDuration timeout) throws Exception { return Await.result(FutureConverters.toScala(completionStage), timeout); } @@ -61,11 +61,11 @@ public abstract class AbstractTest { @After public void actorSystemCleanup() { for (final ActorSystem system : actorSystems) { - JavaTestKit.shutdownActorSystem(system, null, Boolean.TRUE); + TestKit.shutdownActorSystem(system, true); } } - protected ActorSystem newActorSystem(String name, String config) { + protected ActorSystem newActorSystem(final String name, final String config) { ActorSystem system = ActorSystem.create(name, ConfigFactory.load().getConfig(config)); actorSystems.add(system); return system;