X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FDataTreeChangeListenerProxyTest.java;h=7b23260e91f618859524e477dc5a417b5ca01cb7;hp=2b99bfa5820380d27606c83b73a508f2095a6194;hb=e9fc7e7ed2b13d274518d6a872ab67749ef4507a;hpb=60b94e13e2c92ea7d3ef39d4aa6b96674a9415b2 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataTreeChangeListenerProxyTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataTreeChangeListenerProxyTest.java index 2b99bfa582..7b23260e91 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataTreeChangeListenerProxyTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataTreeChangeListenerProxyTest.java @@ -19,7 +19,7 @@ import akka.actor.Props; import akka.actor.Terminated; import akka.dispatch.ExecutionContexts; import akka.dispatch.Futures; -import akka.testkit.JavaTestKit; +import akka.testkit.javadsl.TestKit; import akka.util.Timeout; import com.google.common.util.concurrent.MoreExecutors; import com.google.common.util.concurrent.Uninterruptibles; @@ -51,7 +51,7 @@ public class DataTreeChangeListenerProxyTest extends AbstractActorTest { @Test(timeout = 10000) public void testSuccessfulRegistration() { - new JavaTestKit(getSystem()) { + new TestKit(getSystem()) { { ActorContext actorContext = new ActorContext(getSystem(), getRef(), mock(ClusterWrapper.class), mock(Configuration.class)); @@ -101,7 +101,7 @@ public class DataTreeChangeListenerProxyTest extends AbstractActorTest { @Test(timeout = 10000) public void testSuccessfulRegistrationForClusteredListener() { - new JavaTestKit(getSystem()) { + new TestKit(getSystem()) { { ActorContext actorContext = new ActorContext(getSystem(), getRef(), mock(ClusterWrapper.class), mock(Configuration.class)); @@ -133,7 +133,7 @@ public class DataTreeChangeListenerProxyTest extends AbstractActorTest { @Test(timeout = 10000) public void testLocalShardNotFound() { - new JavaTestKit(getSystem()) { + new TestKit(getSystem()) { { ActorContext actorContext = new ActorContext(getSystem(), getRef(), mock(ClusterWrapper.class), mock(Configuration.class)); @@ -159,7 +159,7 @@ public class DataTreeChangeListenerProxyTest extends AbstractActorTest { @Test(timeout = 10000) public void testLocalShardNotInitialized() { - new JavaTestKit(getSystem()) { + new TestKit(getSystem()) { { ActorContext actorContext = new ActorContext(getSystem(), getRef(), mock(ClusterWrapper.class), mock(Configuration.class)); @@ -176,12 +176,10 @@ public class DataTreeChangeListenerProxyTest extends AbstractActorTest { reply(new NotInitializedException("not initialized")); - new Within(duration("1 seconds")) { - @Override - protected void run() { - expectNoMsg(); - } - }; + within(duration("1 seconds"), () -> { + expectNoMsg(); + return null; + }); proxy.close(); } @@ -190,7 +188,7 @@ public class DataTreeChangeListenerProxyTest extends AbstractActorTest { @Test public void testFailedRegistration() { - new JavaTestKit(getSystem()) { + new TestKit(getSystem()) { { ActorSystem mockActorSystem = mock(ActorSystem.class); @@ -226,7 +224,7 @@ public class DataTreeChangeListenerProxyTest extends AbstractActorTest { @Test public void testCloseBeforeRegistration() { - new JavaTestKit(getSystem()) { + new TestKit(getSystem()) { { ActorContext actorContext = mock(ActorContext.class);