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%2FDataChangeListenerRegistrationTest.java;h=a2bd569b3b88f65791f3371d672651e246327d47;hb=6313c088fc7db266cc25b691e0cd909300fc8425;hp=19b051e4b6119c9bef1d3ffa327934cdcf5caf1d;hpb=c3ea6ff9c64bcd51e46767a18a1370a2b3819dca;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistrationTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistrationTest.java index 19b051e4b6..a2bd569b3b 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistrationTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistrationTest.java @@ -25,7 +25,7 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; public class DataChangeListenerRegistrationTest extends AbstractActorTest { - private static final InMemoryDOMDataStore store = new InMemoryDOMDataStore("OPER", MoreExecutors.sameThreadExecutor()); + private static final InMemoryDOMDataStore store = new InMemoryDOMDataStore("OPER", MoreExecutors.newDirectExecutorService()); static { store.onGlobalContextUpdated(TestModel.createTestContext()); @@ -35,7 +35,7 @@ public class DataChangeListenerRegistrationTest extends AbstractActorTest { @Test public void testOnReceiveCloseListenerRegistration() throws Exception { new JavaTestKit(getSystem()) {{ - final Props props = DataChangeListenerRegistration.props(store + final Props props = DataChangeListenerRegistrationActor.props(store .registerChangeListener(TestModel.TEST_PATH, noOpDataChangeListener(), AsyncDataBroker.DataChangeScope.BASE)); final ActorRef subject = getSystem().actorOf(props, "testCloseListenerRegistration"); @@ -44,13 +44,13 @@ public class DataChangeListenerRegistrationTest extends AbstractActorTest { @Override protected void run() { - subject.tell(new CloseDataChangeListenerRegistration().toSerializable(), getRef()); + subject.tell(CloseDataChangeListenerRegistration.INSTANCE, getRef()); final String out = new ExpectMsg(duration("1 seconds"), "match hint") { // do not put code outside this method, will run afterwards @Override protected String match(final Object in) { - if (in.getClass().equals(CloseDataChangeListenerRegistrationReply.SERIALIZABLE_CLASS)) { + if (in.getClass().equals(CloseDataChangeListenerRegistrationReply.class)) { return "match"; } else { throw noMatch(); @@ -68,7 +68,7 @@ public class DataChangeListenerRegistrationTest extends AbstractActorTest { }}; } - private AsyncDataChangeListener> noOpDataChangeListener(){ + private static AsyncDataChangeListener> noOpDataChangeListener(){ return new AsyncDataChangeListener>() { @Override public void onDataChanged(final AsyncDataChangeEvent> change) {