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%2FDataChangeListenerRegistrationTest.java;fp=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FListenerRegistrationTest.java;h=23302b504ed1c63e4e4ad37d37adbfe251bc4696;hp=0f155ef5979c67dcd396b14dbd25c30bde130923;hb=bf58d8967d18f932df42ed025d2a2bd1a31002ec;hpb=744726a5d58c50102bb391dc9e4f9bd8defb691a diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ListenerRegistrationTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistrationTest.java similarity index 82% rename from opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ListenerRegistrationTest.java rename to opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistrationTest.java index 0f155ef597..23302b504e 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ListenerRegistrationTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistrationTest.java @@ -6,8 +6,8 @@ import akka.testkit.JavaTestKit; import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.MoreExecutors; import org.junit.Test; -import org.opendaylight.controller.cluster.datastore.messages.CloseListenerRegistration; -import org.opendaylight.controller.cluster.datastore.messages.CloseListenerRegistrationReply; +import org.opendaylight.controller.cluster.datastore.messages.CloseDataChangeListenerRegistration; +import org.opendaylight.controller.cluster.datastore.messages.CloseDataChangeListenerRegistrationReply; import org.opendaylight.controller.md.cluster.datastore.model.TestModel; import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker; import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeEvent; @@ -18,7 +18,7 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import static org.junit.Assert.assertEquals; -public class ListenerRegistrationTest extends AbstractActorTest { +public class DataChangeListenerRegistrationTest extends AbstractActorTest { private static ListeningExecutorService storeExecutor = MoreExecutors.listeningDecorator(MoreExecutors.sameThreadExecutor()); private static final InMemoryDOMDataStore store = new InMemoryDOMDataStore("OPER", storeExecutor); @@ -31,18 +31,20 @@ public class ListenerRegistrationTest extends AbstractActorTest { @Test public void testOnReceiveCloseListenerRegistration() throws Exception { new JavaTestKit(getSystem()) {{ - final Props props = ListenerRegistration.props(store.registerChangeListener(TestModel.TEST_PATH, noOpDataChangeListener(), AsyncDataBroker.DataChangeScope.BASE)); + final Props props = DataChangeListenerRegistration.props(store + .registerChangeListener(TestModel.TEST_PATH, noOpDataChangeListener(), + AsyncDataBroker.DataChangeScope.BASE)); final ActorRef subject = getSystem().actorOf(props, "testCloseListenerRegistration"); new Within(duration("1 seconds")) { protected void run() { - subject.tell(new CloseListenerRegistration(), getRef()); + subject.tell(new CloseDataChangeListenerRegistration(), getRef()); final String out = new ExpectMsg("match hint") { // do not put code outside this method, will run afterwards protected String match(Object in) { - if (in instanceof CloseListenerRegistrationReply) { + if (in instanceof CloseDataChangeListenerRegistrationReply) { return "match"; } else { throw noMatch(); @@ -69,4 +71,4 @@ public class ListenerRegistrationTest extends AbstractActorTest { }; } -} \ No newline at end of file +}