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%2FDataChangeListenerRegistrationProxyTest.java;fp=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FDataChangeListenerRegistrationProxyTest.java;h=26b9aa3e94d7c94b8fc92036cbb05fa02b7b68c2;hp=112dce5a722b46821c3429acdd0c439674f0bd5b;hb=e9fc7e7ed2b13d274518d6a872ab67749ef4507a;hpb=cc7d70b6fa32b99e1013c3b3c26006d9798d2b95 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistrationProxyTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistrationProxyTest.java index 112dce5a72..26b9aa3e94 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistrationProxyTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistrationProxyTest.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; @@ -71,7 +71,7 @@ public class DataChangeListenerRegistrationProxyTest 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)); @@ -122,7 +122,7 @@ public class DataChangeListenerRegistrationProxyTest 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)); @@ -176,7 +176,7 @@ public class DataChangeListenerRegistrationProxyTest 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)); @@ -203,7 +203,7 @@ public class DataChangeListenerRegistrationProxyTest 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)); @@ -221,13 +221,7 @@ public class DataChangeListenerRegistrationProxyTest extends AbstractActorTest { reply(new NotInitializedException("not initialized")); - new Within(duration("1 seconds")) { - @Override - protected void run() { - expectNoMsg(); - } - }; - + expectNoMsg(duration("1 seconds")); proxy.close(); } }; @@ -235,7 +229,7 @@ public class DataChangeListenerRegistrationProxyTest extends AbstractActorTest { @Test public void testFailedRegistration() { - new JavaTestKit(getSystem()) { + new TestKit(getSystem()) { { ActorSystem mockActorSystem = mock(ActorSystem.class); @@ -274,7 +268,7 @@ public class DataChangeListenerRegistrationProxyTest extends AbstractActorTest { @Test public void testCloseBeforeRegistration() { - new JavaTestKit(getSystem()) { + new TestKit(getSystem()) { { ActorContext actorContext = mock(ActorContext.class);