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%2Fdatabroker%2Factors%2Fdds%2FEmptyTransactionCommitCohortTest.java;h=fbfdc0a924cdec64f3d7dc89c2b711d5b2a7a7b5;hb=HEAD;hp=60408ae149707aa79132da791edadac514a37863;hpb=514df5b3d350482fee8ee8f1f5b257c229f7e61a;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/EmptyTransactionCommitCohortTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/EmptyTransactionCommitCohortTest.java index 60408ae149..fbfdc0a924 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/EmptyTransactionCommitCohortTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/databroker/actors/dds/EmptyTransactionCommitCohortTest.java @@ -8,7 +8,7 @@ package org.opendaylight.controller.cluster.databroker.actors.dds; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertNotNull; import static org.mockito.Mockito.verify; import static org.opendaylight.controller.cluster.databroker.actors.dds.TestUtils.TRANSACTION_ID; import static org.opendaylight.controller.cluster.databroker.actors.dds.TestUtils.getWithTimeout; @@ -40,22 +40,21 @@ public class EmptyTransactionCommitCohortTest { @Test public void testPreCommit() throws Exception { - final ListenableFuture preCommit = cohort.preCommit(); - assertNull(getWithTimeout(preCommit)); + assertNotNull(getWithTimeout(cohort.preCommit())); } @Test public void testAbort() throws Exception { - final ListenableFuture abort = cohort.abort(); + final ListenableFuture abort = cohort.abort(); verify(history).onTransactionComplete(TRANSACTION_ID); - assertNull(getWithTimeout(abort)); + assertNotNull(getWithTimeout(abort)); } @Test public void testCommit() throws Exception { - final ListenableFuture commit = cohort.commit(); + final ListenableFuture commit = cohort.commit(); verify(history).onTransactionComplete(TRANSACTION_ID); - assertNull(getWithTimeout(commit)); + assertNotNull(getWithTimeout(commit)); } } \ No newline at end of file