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%2Fbroker%2Fimpl%2FDOMTransactionChainTest.java;h=5815faeaa3c75b8c70289e5447c79a12fd5528ac;hp=f36a75d6683c066492965ad43dcd30a816be0f08;hb=cfd2e240178039a439001c4d3f1ca5f26097dcdd;hpb=cd184f0a4226f20838c72ac1fdaf6fa19585df3b;ds=sidebyside diff --git a/opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMTransactionChainTest.java b/opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMTransactionChainTest.java index f36a75d668..5815faeaa3 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMTransactionChainTest.java +++ b/opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMTransactionChainTest.java @@ -73,7 +73,7 @@ public class DOMTransactionChainTest { * First transaction is marked as ready, we are able to allocate chained * transactions. */ - ListenableFuture firstWriteTxFuture = firstTx.submit(); + ListenableFuture firstWriteTxFuture = firstTx.commit(); /** * We alocate chained transaction - read transaction. @@ -114,7 +114,7 @@ public class DOMTransactionChainTest { /** * third transaction is sealed and commited. */ - ListenableFuture thirdDeleteTxFuture = thirdDeleteTx.submit(); + ListenableFuture thirdDeleteTxFuture = thirdDeleteTx.commit(); assertCommitSuccessful(thirdDeleteTxFuture); /** @@ -168,27 +168,27 @@ public class DOMTransactionChainTest { return tx; } - private static DOMDataReadWriteTransaction allocateAndWrite( - final DOMTransactionChain txChain) throws InterruptedException, ExecutionException { + private static DOMDataReadWriteTransaction allocateAndWrite(final DOMTransactionChain txChain) + throws InterruptedException, ExecutionException { DOMDataReadWriteTransaction tx = txChain.newReadWriteTransaction(); assertTestContainerWrite(tx); return tx; } - private static void assertCommitSuccessful( - final ListenableFuture future) throws InterruptedException, ExecutionException { + private static void assertCommitSuccessful(final ListenableFuture future) + throws InterruptedException, ExecutionException { future.get(); } - private static void assertTestContainerExists( - final DOMDataReadTransaction readTx) throws InterruptedException, ExecutionException { + private static void assertTestContainerExists(final DOMDataReadTransaction readTx) + throws InterruptedException, ExecutionException { ListenableFuture>> readFuture = readTx.read(OPERATIONAL, TestModel.TEST_PATH); Optional> readedData = readFuture.get(); assertTrue(readedData.isPresent()); } - private static void assertTestContainerWrite( - final DOMDataReadWriteTransaction tx) throws InterruptedException, ExecutionException { + private static void assertTestContainerWrite(final DOMDataReadWriteTransaction tx) + throws InterruptedException, ExecutionException { tx.put(OPERATIONAL, TestModel.TEST_PATH, ImmutableNodes.containerNode(TestModel.TEST_QNAME)); assertTestContainerExists(tx); }