From 0595c6a0cca8c6cdb79976ab7002ec0dc3ce72ae Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Fri, 29 Dec 2023 01:40:16 +0100 Subject: [PATCH 1/1] Remove setupDistributedDataStoreWithoutConfig() These legacy methods have been deprecated since previous major version, remove them. JIRA: CONTROLLER-2054 Change-Id: I13077de6ca505af6bf8627d7094e49a719636e32 Signed-off-by: Robert Varga --- .../cluster/datastore/IntegrationTestKit.java | 49 ------------------- 1 file changed, 49 deletions(-) diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/IntegrationTestKit.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/IntegrationTestKit.java index f95c6eb4f4..e381152db2 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/IntegrationTestKit.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/IntegrationTestKit.java @@ -34,7 +34,6 @@ import org.opendaylight.controller.cluster.databroker.ClientBackedDataStore; import org.opendaylight.controller.cluster.datastore.DatastoreContext.Builder; import org.opendaylight.controller.cluster.datastore.config.Configuration; import org.opendaylight.controller.cluster.datastore.config.ConfigurationImpl; -import org.opendaylight.controller.cluster.datastore.config.EmptyModuleShardConfigProvider; import org.opendaylight.controller.cluster.datastore.messages.OnDemandShardState; import org.opendaylight.controller.cluster.datastore.persisted.DatastoreSnapshot; import org.opendaylight.controller.cluster.datastore.utils.ActorUtils; @@ -171,54 +170,6 @@ public class IntegrationTestKit extends ShardTestKit { } } - @Deprecated(since = "7.0.0", forRemoval = true) - public DistributedDataStore setupDistributedDataStoreWithoutConfig(final String typeName, - final EffectiveModelContext schemaContext) { - final ClusterWrapper cluster = new ClusterWrapperImpl(getSystem()); - final ConfigurationImpl configuration = new ConfigurationImpl(new EmptyModuleShardConfigProvider()); - - setDataStoreName(typeName); - - final DatastoreContext datastoreContext = getDatastoreContextBuilder().build(); - - final DatastoreContextFactory mockContextFactory = mock(DatastoreContextFactory.class); - doReturn(datastoreContext).when(mockContextFactory).getBaseDatastoreContext(); - doReturn(datastoreContext).when(mockContextFactory).getShardDatastoreContext(anyString()); - - final DistributedDataStore dataStore = new DistributedDataStore(getSystem(), cluster, - configuration, mockContextFactory, restoreFromSnapshot); - - dataStore.onModelContextUpdated(schemaContext); - - datastoreContextBuilder = DatastoreContext.newBuilderFrom(datastoreContext); - return dataStore; - } - - @Deprecated(since = "7.0.0", forRemoval = true) - public DistributedDataStore setupDistributedDataStoreWithoutConfig(final String typeName, - final EffectiveModelContext schemaContext, - final LogicalDatastoreType storeType) { - final ClusterWrapper cluster = new ClusterWrapperImpl(getSystem()); - final ConfigurationImpl configuration = new ConfigurationImpl(new EmptyModuleShardConfigProvider()); - - setDataStoreName(typeName); - - final DatastoreContext datastoreContext = - getDatastoreContextBuilder().logicalStoreType(storeType).build(); - - final DatastoreContextFactory mockContextFactory = mock(DatastoreContextFactory.class); - doReturn(datastoreContext).when(mockContextFactory).getBaseDatastoreContext(); - doReturn(datastoreContext).when(mockContextFactory).getShardDatastoreContext(anyString()); - - final DistributedDataStore dataStore = new DistributedDataStore(getSystem(), cluster, - configuration, mockContextFactory, restoreFromSnapshot); - - dataStore.onModelContextUpdated(schemaContext); - - datastoreContextBuilder = DatastoreContext.newBuilderFrom(datastoreContext); - return dataStore; - } - public void waitUntilLeader(final ActorUtils actorUtils, final String... shardNames) { for (String shardName: shardNames) { ActorRef shard = findLocalShard(actorUtils, shardName); -- 2.36.6