X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fmodification%2FAbstractModificationTest.java;h=6912463ebb7b25b4793c31f8fa6f727878986baf;hp=d9c550a6db482d39855dc5a48ebb26b2fec8c6ad;hb=5464f50be733df1bbbe31cf05665d542d3b7c5e7;hpb=11e9ade9af527aba7faeb633d3c9c7552fd09d2d diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/modification/AbstractModificationTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/modification/AbstractModificationTest.java index d9c550a6db..6912463ebb 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/modification/AbstractModificationTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/modification/AbstractModificationTest.java @@ -22,23 +22,23 @@ import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; public abstract class AbstractModificationTest { - protected InMemoryDOMDataStore store; + protected InMemoryDOMDataStore store; - @Before - public void setUp(){ - store = new InMemoryDOMDataStore("test", MoreExecutors.sameThreadExecutor()); - store.onGlobalContextUpdated(TestModel.createTestContext()); - } + @Before + public void setUp() { + store = new InMemoryDOMDataStore("test", MoreExecutors.newDirectExecutorService()); + store.onGlobalContextUpdated(TestModel.createTestContext()); + } - protected void commitTransaction(DOMStoreWriteTransaction transaction){ - DOMStoreThreePhaseCommitCohort cohort = transaction.ready(); - cohort.preCommit(); - cohort.commit(); - } + protected void commitTransaction(final DOMStoreWriteTransaction transaction) { + DOMStoreThreePhaseCommitCohort cohort = transaction.ready(); + cohort.preCommit(); + cohort.commit(); + } - protected Optional> readData(YangInstanceIdentifier path) throws Exception{ - DOMStoreReadTransaction transaction = store.newReadOnlyTransaction(); - ListenableFuture>> future = transaction.read(path); - return future.get(); - } + protected Optional> readData(final YangInstanceIdentifier path) throws Exception { + DOMStoreReadTransaction transaction = store.newReadOnlyTransaction(); + ListenableFuture>> future = transaction.read(path); + return future.get(); + } }