Merge "Fixed concurrency bug in DOMTransactionChainTest"
authorEd Warnicke <eaw@cisco.com>
Wed, 25 Jun 2014 16:08:24 +0000 (16:08 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Wed, 25 Jun 2014 16:08:24 +0000 (16:08 +0000)
opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMTransactionChainTest.java

index 2a955e5f4215e6dccc0c397ca9c0850ccb159aa3..38f08b30f94ea37d4e73e3537c5c7bd798eb12ed 100644 (file)
@@ -104,28 +104,29 @@ public class DOMTransactionChainTest {
          */
         DOMDataReadWriteTransaction thirdDeleteTx = allocateAndDelete(txChain);
 
-        /**
-         * third transaction is sealed.
-         */
-        ListenableFuture<RpcResult<TransactionStatus>> thirdDeleteTxFuture = thirdDeleteTx.commit();
-
         /**
          * We commit first transaction
          *
          */
         assertCommitSuccessful(firstWriteTxFuture);
 
-        // Alocates store transaction
+        /**
+         *
+         * Allocates transaction from data store.
+         *
+         */
         DOMDataReadTransaction storeReadTx = domBroker.newReadOnlyTransaction();
+
         /**
          * We verify transaction is commited to store, container should exists
          * in datastore.
          */
         assertTestContainerExists(storeReadTx);
+
         /**
-         * We commit third transaction
-         *
+         * third transaction is sealed and commited
          */
+        ListenableFuture<RpcResult<TransactionStatus>> thirdDeleteTxFuture = thirdDeleteTx.commit();
         assertCommitSuccessful(thirdDeleteTxFuture);
 
         /**