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;h=6f8035e2d1bda329dd975fd1d5d87fd5856e4581;hp=c27993f97b9fef669c03f0c378e83f8474944e96;hb=refs%2Fchanges%2F46%2F12646%2F9;hpb=c8e6e650e2dd0647dbfed665244445cf64c1e262 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 c27993f97b..6f8035e2d1 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 @@ -66,7 +66,6 @@ public class DataChangeListenerRegistrationProxyTest extends AbstractActorTest { Assert.assertEquals(mockListener, proxy.getInstance()); } - @SuppressWarnings("unchecked") @Test(timeout=10000) public void testSuccessfulRegistration() { new JavaTestKit(getSystem()) {{ @@ -204,8 +203,7 @@ public class DataChangeListenerRegistrationProxyTest extends AbstractActorTest { doReturn(mockActorSystem).when(actorContext).getActorSystem(); doReturn(duration("5 seconds")).when(actorContext).getOperationDuration(); - doReturn(Futures.successful(getRef())).when(actorContext).findLocalShardAsync(eq(shardName), - any(Timeout.class)); + doReturn(Futures.successful(getRef())).when(actorContext).findLocalShardAsync(eq(shardName)); doReturn(Futures.failed(new RuntimeException("mock"))). when(actorContext).executeOperationAsync(any(ActorRef.class), any(Object.class), any(Timeout.class)); @@ -218,7 +216,6 @@ public class DataChangeListenerRegistrationProxyTest extends AbstractActorTest { }}; } - @SuppressWarnings("unchecked") @Test public void testCloseBeforeRegistration() { new JavaTestKit(getSystem()) {{ @@ -228,12 +225,12 @@ public class DataChangeListenerRegistrationProxyTest extends AbstractActorTest { final DataChangeListenerRegistrationProxy proxy = new DataChangeListenerRegistrationProxy( shardName, actorContext, mockListener); + doReturn(DatastoreContext.newBuilder().build()).when(actorContext).getDatastoreContext(); doReturn(getSystem()).when(actorContext).getActorSystem(); doReturn(getSystem().actorSelection(getRef().path())). when(actorContext).actorSelection(getRef().path()); doReturn(duration("5 seconds")).when(actorContext).getOperationDuration(); - doReturn(Futures.successful(getRef())).when(actorContext).findLocalShardAsync(eq(shardName), - any(Timeout.class)); + doReturn(Futures.successful(getRef())).when(actorContext).findLocalShardAsync(eq(shardName)); Answer> answer = new Answer>() { @Override