X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fstore%2Fimpl%2FInMemoryDataStoreTest.java;h=413d81d0295694ae0e670c7297a0c77c155e9738;hp=94ac8d652e637491311c7ac94ce1ba043016569d;hb=8ed8fa9905f7187797c771bef12c14596a3e2da7;hpb=d13cb0180a6b77673c44d94601347350fb46b4fc diff --git a/opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDataStoreTest.java b/opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDataStoreTest.java index 94ac8d652e..413d81d029 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDataStoreTest.java +++ b/opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDataStoreTest.java @@ -45,24 +45,24 @@ public class InMemoryDataStoreTest { DOMStoreReadWriteTransaction writeTx = domStore.newReadWriteTransaction(); assertNotNull(writeTx); /** - * + * * Writes /test in writeTx - * + * */ writeTx.write(TestModel.TEST_PATH, ImmutableNodes.containerNode(TestModel.TEST_QNAME)); /** - * + * * Reads /test from writeTx Read should return container. - * + * */ ListenableFuture>> writeTxContainer = writeTx.read(TestModel.TEST_PATH); assertTrue(writeTxContainer.get().isPresent()); /** - * + * * Reads /test from readTx Read should return Absent. - * + * */ ListenableFuture>> readTxContainer = readTx.read(TestModel.TEST_PATH); assertFalse(readTxContainer.get().isPresent()); @@ -74,16 +74,16 @@ public class InMemoryDataStoreTest { DOMStoreReadWriteTransaction writeTx = domStore.newReadWriteTransaction(); assertNotNull(writeTx); /** - * + * * Writes /test in writeTx - * + * */ writeTx.write(TestModel.TEST_PATH, ImmutableNodes.containerNode(TestModel.TEST_QNAME)); /** - * + * * Reads /test from writeTx Read should return container. - * + * */ ListenableFuture>> writeTxContainer = writeTx.read(TestModel.TEST_PATH); assertTrue(writeTxContainer.get().isPresent()); @@ -123,8 +123,8 @@ public class InMemoryDataStoreTest { /** * We alocate new read-write transaction and write /test - * - * + * + * */ DOMStoreReadWriteTransaction firstTx = txChain.newReadWriteTransaction(); assertTestContainerWrite(firstTx); @@ -142,27 +142,27 @@ public class InMemoryDataStoreTest { DOMStoreReadTransaction secondReadTx = txChain.newReadOnlyTransaction(); /** - * + * * We test if we are able to read data from tx, read should not fail * since we are using chained transaction. - * - * + * + * */ assertTestContainerExists(secondReadTx); /** - * + * * We alocate next transaction, which is still based on first one, but * is read-write. - * + * */ DOMStoreReadWriteTransaction thirdDeleteTx = txChain.newReadWriteTransaction(); /** * We test existence of /test in third transaction container should * still be visible from first one (which is still uncommmited). - * - * + * + * */ assertTestContainerExists(thirdDeleteTx); @@ -178,7 +178,7 @@ public class InMemoryDataStoreTest { /** * We commit first transaction - * + * */ assertThreePhaseCommit(firstWriteTxCohort); @@ -191,7 +191,7 @@ public class InMemoryDataStoreTest { assertTestContainerExists(storeReadTx); /** * We commit third transaction - * + * */ assertThreePhaseCommit(thirdDeleteTxCohort); } @@ -225,9 +225,9 @@ public class InMemoryDataStoreTest { private static Optional> assertTestContainerWrite(final DOMStoreReadWriteTransaction writeTx) throws InterruptedException, ExecutionException { /** - * + * * Writes /test in writeTx - * + * */ writeTx.write(TestModel.TEST_PATH, ImmutableNodes.containerNode(TestModel.TEST_QNAME)); @@ -235,9 +235,9 @@ public class InMemoryDataStoreTest { } /** - * + * * Reads /test from readTx Read should return container. - * + * */ private static Optional> assertTestContainerExists(DOMStoreReadTransaction readTx) throws InterruptedException, ExecutionException {