Remove setupDistributedDataStoreWithoutConfig() 53/109453/2
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 29 Dec 2023 00:40:16 +0000 (01:40 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 29 Dec 2023 01:12:20 +0000 (02:12 +0100)
These legacy methods have been deprecated since previous major version,
remove them.

JIRA: CONTROLLER-2054
Change-Id: I13077de6ca505af6bf8627d7094e49a719636e32
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/IntegrationTestKit.java

index f95c6eb4f4b0ac6fee03e18b8b114e4d769c62bc..e381152db221db1f11e4a5ba5eff61f7ec415cc2 100644 (file)
@@ -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);