X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-broker%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fbroker%2Fimpl%2FDOMBrokerPerformanceTest.java;h=181396fc884699e07eef9e0778e1ce3655d5e721;hb=c222e37f2a0f0f3f6266242fbea2d3b018f4e6e3;hp=29e078918e65eeae080f62c61d6ce5bae4fc3a9f;hpb=5135f2d97f0886632f3ad3b7160a3be54909810f;p=controller.git diff --git a/opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMBrokerPerformanceTest.java b/opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMBrokerPerformanceTest.java index 29e078918e..181396fc88 100644 --- a/opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMBrokerPerformanceTest.java +++ b/opendaylight/md-sal/sal-dom-broker/src/test/java/org/opendaylight/controller/md/sal/dom/broker/impl/DOMBrokerPerformanceTest.java @@ -18,7 +18,7 @@ import org.opendaylight.controller.md.sal.dom.api.DOMDataReadWriteTransaction; import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore; import org.opendaylight.controller.md.sal.dom.store.impl.TestModel; import org.opendaylight.controller.sal.core.spi.data.DOMStore; -import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier; +import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode; import org.opendaylight.yangtools.yang.data.impl.schema.ImmutableNodes; import org.opendaylight.yangtools.yang.model.api.SchemaContext; @@ -40,8 +40,8 @@ public class DOMBrokerPerformanceTest { return ImmutableNodes.mapEntry(TestModel.OUTER_LIST_QNAME, TestModel.ID_QNAME, i); } - private static InstanceIdentifier outerListPath(final int i) { - return InstanceIdentifier.builder(TestModel.OUTER_LIST_PATH)// + private static YangInstanceIdentifier outerListPath(final int i) { + return YangInstanceIdentifier.builder(TestModel.OUTER_LIST_PATH)// .nodeWithKey(TestModel.OUTER_LIST_QNAME, TestModel.ID_QNAME, i) // .build(); } @@ -141,11 +141,11 @@ public class DOMBrokerPerformanceTest { int i = 0; for (DOMDataReadWriteTransaction writeTx :transactions) { // Writes /test/outer-list/i in writeTx - InstanceIdentifier path = InstanceIdentifier.builder(outerListPath(i)) + YangInstanceIdentifier path = YangInstanceIdentifier.builder(outerListPath(i)) .node(TestModel.INNER_LIST_QNAME).build(); writeTx.put(OPERATIONAL, path, ImmutableNodes.mapNodeBuilder(TestModel.INNER_LIST_QNAME).build()); for (int j = 0; j < innerNum; j++) { - InstanceIdentifier innerPath = InstanceIdentifier.builder(path) + YangInstanceIdentifier innerPath = YangInstanceIdentifier.builder(path) .nodeWithKey(TestModel.INNER_LIST_QNAME, TestModel.NAME_QNAME, String.valueOf(j)) .build(); writeTx.put( @@ -169,7 +169,7 @@ public class DOMBrokerPerformanceTest { public List> call() throws Exception { List> builder = new ArrayList<>(txNum); for (DOMDataReadWriteTransaction tx :transactions) { - builder.add(tx.commit()); + builder.add(tx.submit()); } return builder; } @@ -205,7 +205,7 @@ public class DOMBrokerPerformanceTest { public Void call() throws Exception { for (int i = 0; i < txNum; i++) { for (int j = 0; j < innerNum; j++) { - InstanceIdentifier path = InstanceIdentifier + YangInstanceIdentifier path = YangInstanceIdentifier .builder(outerListPath(i)) // .node(TestModel.INNER_LIST_QNAME) @@ -267,7 +267,7 @@ public class DOMBrokerPerformanceTest { measure("Txs:1 Submit", new Callable>() { @Override public ListenableFuture call() throws Exception { - return writeTx.commit(); + return writeTx.submit(); } }).get(); return null;