From 061102a5ad9d11e1927feaf5626b4fd9c27b1f81 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Wed, 11 Mar 2020 10:30:05 +0100 Subject: [PATCH] Fix test locations Some of our tests are still located in legacy packages from controller. Fix this by moving them to appropriate packages in mdsal structure. Change-Id: I4beac6dc0c98a1b1d7e022dddae57bedbf54aca9 Signed-off-by: Robert Varga --- .../dom/api/AbstractDOMDataTreeServiceTestSuite.java | 8 +------- .../store/inmemory/InMemoryDOMDataStoreFactoryTest.java | 1 - .../dom/store/inmemory/InMemoryDOMDataTreeShardTest.java | 2 +- .../dom/store/inmemory}/InMemoryDataStoreTest.java | 3 +-- .../store/inmemory}/SchemaUpdateForTransactionTest.java | 5 ++--- .../dom/store/inmemory}/TestDCLExecutorService.java | 3 +-- .../impl => mdsal/dom/store/inmemory}/TestModel.java | 2 +- 7 files changed, 7 insertions(+), 17 deletions(-) rename dom/mdsal-dom-api/src/test/java/org/opendaylight/{controller/md/sal => mdsal}/dom/api/AbstractDOMDataTreeServiceTestSuite.java (88%) rename dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/{controller/md/sal/dom/store/impl => mdsal/dom/store/inmemory}/InMemoryDataStoreTest.java (99%) rename dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/{controller/md/sal/dom/store/impl => mdsal/dom/store/inmemory}/SchemaUpdateForTransactionTest.java (96%) rename dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/{controller/md/sal/dom/store/impl => mdsal/dom/store/inmemory}/TestDCLExecutorService.java (95%) rename dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/{controller/md/sal/dom/store/impl => mdsal/dom/store/inmemory}/TestModel.java (97%) diff --git a/dom/mdsal-dom-api/src/test/java/org/opendaylight/controller/md/sal/dom/api/AbstractDOMDataTreeServiceTestSuite.java b/dom/mdsal-dom-api/src/test/java/org/opendaylight/mdsal/dom/api/AbstractDOMDataTreeServiceTestSuite.java similarity index 88% rename from dom/mdsal-dom-api/src/test/java/org/opendaylight/controller/md/sal/dom/api/AbstractDOMDataTreeServiceTestSuite.java rename to dom/mdsal-dom-api/src/test/java/org/opendaylight/mdsal/dom/api/AbstractDOMDataTreeServiceTestSuite.java index e89f9f1f91..89b118ddfc 100644 --- a/dom/mdsal-dom-api/src/test/java/org/opendaylight/controller/md/sal/dom/api/AbstractDOMDataTreeServiceTestSuite.java +++ b/dom/mdsal-dom-api/src/test/java/org/opendaylight/mdsal/dom/api/AbstractDOMDataTreeServiceTestSuite.java @@ -5,7 +5,7 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ -package org.opendaylight.controller.md.sal.dom.api; +package org.opendaylight.mdsal.dom.api; import static org.junit.Assert.assertNotNull; @@ -16,12 +16,6 @@ import java.util.concurrent.ExecutionException; import org.eclipse.jdt.annotation.NonNull; import org.junit.Test; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; -import org.opendaylight.mdsal.dom.api.DOMDataTreeCursorAwareTransaction; -import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier; -import org.opendaylight.mdsal.dom.api.DOMDataTreeProducer; -import org.opendaylight.mdsal.dom.api.DOMDataTreeProducerException; -import org.opendaylight.mdsal.dom.api.DOMDataTreeService; -import org.opendaylight.mdsal.dom.api.DOMDataTreeWriteCursor; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.common.QNameModule; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; diff --git a/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/InMemoryDOMDataStoreFactoryTest.java b/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/InMemoryDOMDataStoreFactoryTest.java index 8f73669fdd..1cf3ce1aca 100644 --- a/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/InMemoryDOMDataStoreFactoryTest.java +++ b/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/InMemoryDOMDataStoreFactoryTest.java @@ -18,7 +18,6 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import org.junit.Test; -import org.opendaylight.controller.md.sal.dom.store.impl.TestModel; import org.opendaylight.mdsal.dom.api.DOMDataTreeChangeListener; import org.opendaylight.mdsal.dom.api.DOMSchemaService; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; diff --git a/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/InMemoryDOMDataTreeShardTest.java b/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/InMemoryDOMDataTreeShardTest.java index 7e2c5bb757..d2e9856996 100644 --- a/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/InMemoryDOMDataTreeShardTest.java +++ b/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/InMemoryDOMDataTreeShardTest.java @@ -16,7 +16,7 @@ import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; -import static org.opendaylight.controller.md.sal.dom.store.impl.TestModel.createTestContext; +import static org.opendaylight.mdsal.dom.store.inmemory.TestModel.createTestContext; import static org.opendaylight.mdsal.dom.store.inmemory.TestUtils.DOM_DATA_TREE_IDENTIFIER; import static org.opendaylight.mdsal.dom.store.inmemory.TestUtils.DOM_DATA_TREE_SHARD_PRODUCER; import static org.opendaylight.mdsal.dom.store.inmemory.TestUtils.resetMocks; diff --git a/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDataStoreTest.java b/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/InMemoryDataStoreTest.java similarity index 99% rename from dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDataStoreTest.java rename to dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/InMemoryDataStoreTest.java index 234ba1b10b..d4c64204c5 100644 --- a/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/InMemoryDataStoreTest.java +++ b/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/InMemoryDataStoreTest.java @@ -5,7 +5,7 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ -package org.opendaylight.controller.md.sal.dom.store.impl; +package org.opendaylight.mdsal.dom.store.inmemory; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -29,7 +29,6 @@ import org.opendaylight.mdsal.dom.spi.store.DOMStoreTransactionChain; import org.opendaylight.mdsal.dom.spi.store.DOMStoreWriteTransaction; import org.opendaylight.mdsal.dom.spi.store.SnapshotBackedTransactions; import org.opendaylight.mdsal.dom.spi.store.SnapshotBackedWriteTransaction.TransactionReadyPrototype; -import org.opendaylight.mdsal.dom.store.inmemory.InMemoryDOMDataStore; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier; import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode; diff --git a/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/SchemaUpdateForTransactionTest.java b/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/SchemaUpdateForTransactionTest.java similarity index 96% rename from dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/SchemaUpdateForTransactionTest.java rename to dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/SchemaUpdateForTransactionTest.java index 4611fa860b..547708e12f 100644 --- a/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/SchemaUpdateForTransactionTest.java +++ b/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/SchemaUpdateForTransactionTest.java @@ -5,7 +5,7 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ -package org.opendaylight.controller.md.sal.dom.store.impl; +package org.opendaylight.mdsal.dom.store.inmemory; import static org.junit.Assert.assertNotNull; @@ -15,13 +15,12 @@ import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.opendaylight.mdsal.dom.spi.store.DOMStoreReadWriteTransaction; -import org.opendaylight.mdsal.dom.store.inmemory.InMemoryDOMDataStore; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; import org.opendaylight.yangtools.yang.model.api.SchemaContext; public class SchemaUpdateForTransactionTest { - private static final YangInstanceIdentifier TOP_PATH = YangInstanceIdentifier.of(TestModel.TEST_QNAME); + private SchemaContext schemaContext; private InMemoryDOMDataStore domStore; diff --git a/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/TestDCLExecutorService.java b/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/TestDCLExecutorService.java similarity index 95% rename from dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/TestDCLExecutorService.java rename to dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/TestDCLExecutorService.java index 6a9afe0cf4..0030eacb82 100644 --- a/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/TestDCLExecutorService.java +++ b/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/TestDCLExecutorService.java @@ -5,8 +5,7 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ - -package org.opendaylight.controller.md.sal.dom.store.impl; +package org.opendaylight.mdsal.dom.store.inmemory; import com.google.common.util.concurrent.ForwardingExecutorService; import com.google.common.util.concurrent.MoreExecutors; diff --git a/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/TestModel.java b/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/TestModel.java similarity index 97% rename from dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/TestModel.java rename to dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/TestModel.java index be3bc98a12..ff8f9e7866 100644 --- a/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/controller/md/sal/dom/store/impl/TestModel.java +++ b/dom/mdsal-dom-inmemory-datastore/src/test/java/org/opendaylight/mdsal/dom/store/inmemory/TestModel.java @@ -5,7 +5,7 @@ * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ -package org.opendaylight.controller.md.sal.dom.store.impl; +package org.opendaylight.mdsal.dom.store.inmemory; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier; -- 2.36.6