X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-inmemory-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fstore%2Fimpl%2FSchemaUpdateForTransactionTest.java;h=9910039e2e187f012b235ea43fb3afb4e64d932a;hp=e7af4dffae98b0b0543a8919c8ead80c6132512a;hb=db89afdefb3cfa4454dfdc6008e1d54d3ede66fb;hpb=686d381ea589ebf33bcfb0bbc7048ffe242749c4 diff --git a/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/SchemaUpdateForTransactionTest.java b/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/SchemaUpdateForTransactionTest.java index e7af4dffae..9910039e2e 100644 --- a/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/SchemaUpdateForTransactionTest.java +++ b/opendaylight/md-sal/sal-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/SchemaUpdateForTransactionTest.java @@ -14,9 +14,9 @@ import java.util.concurrent.ExecutionException; import org.junit.Before; import org.junit.Test; import org.opendaylight.controller.sal.core.spi.data.DOMStoreReadWriteTransaction; +import org.opendaylight.mdsal.binding.generator.impl.ModuleInfoBackedContext; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.bi.ba.rpcservice.rev140701.RockTheHouseInput; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.Top; -import org.opendaylight.yangtools.sal.binding.generator.impl.ModuleInfoBackedContext; import org.opendaylight.yangtools.yang.binding.YangModuleInfo; import org.opendaylight.yangtools.yang.binding.util.BindingReflections; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; @@ -31,22 +31,22 @@ public class SchemaUpdateForTransactionTest { @Before public void setupStore() { - domStore = new InMemoryDOMDataStore("TEST", MoreExecutors.newDirectExecutorService()); + this.domStore = new InMemoryDOMDataStore("TEST", MoreExecutors.newDirectExecutorService()); loadSchemas(RockTheHouseInput.class); } public void loadSchemas(final Class... classes) { YangModuleInfo moduleInfo; try { - ModuleInfoBackedContext context = ModuleInfoBackedContext.create(); - for (Class clz : classes) { + final ModuleInfoBackedContext context = ModuleInfoBackedContext.create(); + for (final Class clz : classes) { moduleInfo = BindingReflections.getModuleInfo(clz); context.registerModuleInfo(moduleInfo); } - schemaContext = context.tryToCreateSchemaContext().get(); - domStore.onGlobalContextUpdated(schemaContext); - } catch (Exception e) { + this.schemaContext = context.tryToCreateSchemaContext().get(); + this.domStore.onGlobalContextUpdated(this.schemaContext); + } catch (final Exception e) { Throwables.propagateIfPossible(e); } } @@ -68,11 +68,11 @@ public class SchemaUpdateForTransactionTest { @Test public void testTransactionSchemaUpdate() throws InterruptedException, ExecutionException { - assertNotNull(domStore); + assertNotNull(this.domStore); // We allocate transaction, initial schema context does not // contain Lists model - DOMStoreReadWriteTransaction writeTx = domStore.newReadWriteTransaction(); + final DOMStoreReadWriteTransaction writeTx = this.domStore.newReadWriteTransaction(); assertNotNull(writeTx); // we trigger schema context update to contain Lists model