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%2FAbstractShardTest.java;h=f5a7551176028427cbf6feb64270da4897696f0f;hb=6602310b78b5bf54899456e2efa867d116731267;hp=1c8686c1b1daac3b34d546fc3fe40b1cbdfe2f72;hpb=ff818d5df82e34d0031289901e0335fe15c91303;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractShardTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractShardTest.java index 1c8686c1b1..f5a7551176 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractShardTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractShardTest.java @@ -310,7 +310,7 @@ public abstract class AbstractShardTest extends AbstractActorTest { BatchedModifications batched = newBatchedModifications(nextTransactionId(), id, node, true, true, 1); DataTreeModification modification = store.getDataTree().takeSnapshot().newModification(); batched.apply(modification); - store.notifyListeners(store.commit(modification)); + store.notifyListeners(commitTransaction(store.getDataTree(), modification)); } public static void writeToStore(final DataTree store, final YangInstanceIdentifier id, @@ -334,7 +334,7 @@ public abstract class AbstractShardTest extends AbstractActorTest { DataTreeModification modification = store.getDataTree().takeSnapshot().newModification(); batched.apply(modification); - store.notifyListeners(store.commit(modification)); + store.notifyListeners(commitTransaction(store.getDataTree(), modification)); } DataTree setupInMemorySnapshotStore() throws DataValidationFailedException { @@ -406,11 +406,13 @@ public abstract class AbstractShardTest extends AbstractActorTest { return mockCandidate; } - static void commitTransaction(final DataTree store, final DataTreeModification modification) + static DataTreeCandidate commitTransaction(final DataTree store, final DataTreeModification modification) throws DataValidationFailedException { modification.ready(); store.validate(modification); - store.commit(store.prepare(modification)); + final DataTreeCandidate candidate = store.prepare(modification); + store.commit(candidate); + return candidate; } @SuppressWarnings("serial")