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%2FTransactionProxyTest.java;h=abfe7eae22a15b69fd4dc1c71df46befe5059e31;hb=fbe5f5c05c84d4b369e7592a98e9243d81072028;hp=6573308c12100914badbedc5d0296b90e096a2b7;hpb=dc5eceede07e499e5c5e0ab60d7ce42bc596fcc0;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java index 6573308c12..abfe7eae22 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TransactionProxyTest.java @@ -1071,6 +1071,17 @@ public class TransactionProxyTest { verifyCohortFutures(proxy, IllegalArgumentException.class); } + @Test + public void testUnusedTransaction() throws Exception { + TransactionProxy transactionProxy = new TransactionProxy(mockActorContext, READ_WRITE); + + DOMStoreThreePhaseCommitCohort ready = transactionProxy.ready(); + + assertEquals("canCommit", true, ready.canCommit().get()); + ready.preCommit().get(); + ready.commit().get(); + } + @Test public void testGetIdentifier() { setupActorContextWithInitialCreateTransaction(getSystem(), READ_ONLY);