Remove ask-based datastore integration tests 56/109456/7
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 29 Dec 2023 01:12:38 +0000 (02:12 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 29 Dec 2023 09:52:44 +0000 (10:52 +0100)
Eliminate DistributedDataStore as an argument.

JIRA: CONTROLLER-2054
Change-Id: If44dd72706c028f5d3901a759549fec27257d5d3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractDataStore.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DistributedDataStore.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreIntegrationTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreRemotingIntegrationTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreWithSegmentedJournalIntegrationTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TestDistributedDataStore.java [deleted file]

index d90f71941fc0a619cd2b910a749a3d5b4c04739a..7be6afe923625faaf2b0fc14bd6e56880f134511 100644 (file)
@@ -128,13 +128,6 @@ public abstract class AbstractDataStore implements DistributedDataStoreInterface
         datastoreInfoMXBean.registerMBean();
     }
 
-    @VisibleForTesting
-    protected AbstractDataStore(final ActorUtils actorUtils, final ClientIdentifier identifier) {
-        this.actorUtils = requireNonNull(actorUtils, "actorContext should not be null");
-        client = null;
-        this.identifier = requireNonNull(identifier);
-    }
-
     @VisibleForTesting
     protected AbstractDataStore(final ActorUtils actorUtils, final ClientIdentifier identifier,
                                 final DataStoreClient clientActor) {
index 5572d577cc40776150694474b4c2deeb55df0842..b7131b07e7662b0e4b719b43f537849de4761840 100644 (file)
@@ -9,11 +9,8 @@
 package org.opendaylight.controller.cluster.datastore;
 
 import akka.actor.ActorSystem;
-import com.google.common.annotations.VisibleForTesting;
-import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
 import org.opendaylight.controller.cluster.datastore.config.Configuration;
 import org.opendaylight.controller.cluster.datastore.persisted.DatastoreSnapshot;
-import org.opendaylight.controller.cluster.datastore.utils.ActorUtils;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreReadTransaction;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreReadWriteTransaction;
 import org.opendaylight.mdsal.dom.spi.store.DOMStoreTransactionChain;
@@ -35,13 +32,6 @@ public class DistributedDataStore extends AbstractDataStore {
         txContextFactory = new TransactionContextFactory(getActorUtils(), getIdentifier());
     }
 
-    @VisibleForTesting
-    DistributedDataStore(final ActorUtils actorUtils, final ClientIdentifier identifier) {
-        super(actorUtils, identifier);
-        txContextFactory = new TransactionContextFactory(getActorUtils(), getIdentifier());
-    }
-
-
     @Override
     public DOMStoreTransactionChain createTransactionChain() {
         return txContextFactory.createTransactionChain();
index eb6ab931288bc66d7aba499bdc7da5161355ab7c..6f0a0f5b87dac580797d18e7e3bf85c0977a0717 100644 (file)
@@ -55,7 +55,7 @@ public class DistributedDataStoreIntegrationTest extends AbstractDistributedData
     @Parameters(name = "{0}")
     public static Collection<Object[]> data() {
         return Arrays.asList(new Object[][] {
-                { TestDistributedDataStore.class }, { TestClientBackedDataStore.class }
+            { TestClientBackedDataStore.class }
         });
     }
 
index d82ae0fd7702be863be45207ee8a65c553e9761e..816d2acff7c874c4a3113c138b22d4583a20c689 100644 (file)
@@ -143,7 +143,7 @@ public class DistributedDataStoreRemotingIntegrationTest extends AbstractTest {
     @Parameters(name = "{0}")
     public static Collection<Object[]> data() {
         return Arrays.asList(new Object[][] {
-                { TestDistributedDataStore.class, 7 }, { TestClientBackedDataStore.class, 12 }
+                { TestClientBackedDataStore.class, 12 }
         });
     }
 
index ade53166074a09a3503ecff2e6d16f2434634cc3..9c3c58f08c83211b82525793ddcbc9a86b96d54d 100644 (file)
@@ -55,7 +55,7 @@ public class DistributedDataStoreWithSegmentedJournalIntegrationTest
     @Parameters(name = "{0}")
     public static Collection<Object[]> data() {
         return Arrays.asList(new Object[][] {
-                { TestDistributedDataStore.class }, { TestClientBackedDataStore.class }
+                { TestClientBackedDataStore.class }
         });
     }
 
diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TestDistributedDataStore.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/TestDistributedDataStore.java
deleted file mode 100644 (file)
index 638b396..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2019 PANTHEON.tech, s.r.o. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * 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.cluster.datastore;
-
-import akka.actor.ActorSystem;
-import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
-import org.opendaylight.controller.cluster.datastore.config.Configuration;
-import org.opendaylight.controller.cluster.datastore.persisted.DatastoreSnapshot;
-import org.opendaylight.controller.cluster.datastore.shardmanager.AbstractShardManagerCreator;
-import org.opendaylight.controller.cluster.datastore.shardmanager.TestShardManager;
-import org.opendaylight.controller.cluster.datastore.utils.ActorUtils;
-
-@Deprecated(since = "7.0.0", forRemoval = true)
-public class TestDistributedDataStore extends DistributedDataStore implements LocalShardStore {
-
-    public TestDistributedDataStore(final ActorSystem actorSystem, final ClusterWrapper cluster,
-                                    final Configuration configuration,
-                                    final DatastoreContextFactory datastoreContextFactory,
-                                    final DatastoreSnapshot restoreFromSnapshot) {
-        super(actorSystem, cluster, configuration, datastoreContextFactory, restoreFromSnapshot);
-    }
-
-    TestDistributedDataStore(final ActorUtils actorUtils, final ClientIdentifier identifier) {
-        super(actorUtils, identifier);
-    }
-
-    @Override
-    protected AbstractShardManagerCreator<?> getShardManagerCreator() {
-        return new TestShardManager.TestShardManagerCreator();
-    }
-
-    @Override
-    public TestShardManager.GetLocalShardsReply getLocalShards() {
-        TestShardManager.GetLocalShardsReply reply =
-            (TestShardManager.GetLocalShardsReply) getActorUtils()
-                .executeOperation(getActorUtils().getShardManager(), TestShardManager.GetLocalShards.INSTANCE);
-
-        return reply;
-    }
-}