diff options
author | Tomasz Golabek <tomasz.golabek@nokia.com> | 2019-06-25 14:30:23 +0200 |
---|---|---|
committer | Ofir Sonsino <ofir.sonsino@intl.att.com> | 2019-07-14 11:55:00 +0000 |
commit | 5bb0a3b09bfe2c7f12af05af83223501c29a3f76 (patch) | |
tree | 9e7f3acdc5ad70111289b5c81baa4d9ffc86c222 /catalog-be/src/test/java | |
parent | ff5db76f909826b332bcf294752646ed65ffaae5 (diff) |
ComponentCache & ComponentCassandraDao removal
Also removed all classes uses these two.
Change-Id: I6793c3c935ae61c5c65f70d3541c542edf188ab4
Issue-ID: SDC-2389
Signed-off-by: Tomasz Golabek <tomasz.golabek@nokia.com>
Diffstat (limited to 'catalog-be/src/test/java')
6 files changed, 0 insertions, 112 deletions
diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/BaseServiceBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/BaseServiceBusinessLogicTest.java index 49455c2b66..e569499f82 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/BaseServiceBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/BaseServiceBusinessLogicTest.java @@ -46,7 +46,6 @@ import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ForwardingPathOperat import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade; import org.openecomp.sdc.be.model.operations.api.IElementOperation; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; -import org.openecomp.sdc.be.model.operations.impl.CacheMangerOperation; import org.openecomp.sdc.be.model.operations.impl.GraphLockOperation; import org.openecomp.sdc.be.resources.data.auditing.ResourceAdminEvent; import org.openecomp.sdc.be.user.Role; @@ -83,7 +82,6 @@ public abstract class BaseServiceBusinessLogicTest { GraphLockOperation graphLockOperation = Mockito.mock(GraphLockOperation.class); JanusGraphDao mockJanusGraphDao = Mockito.mock(JanusGraphDao.class); ToscaOperationFacade toscaOperationFacade = Mockito.mock(ToscaOperationFacade.class); - CacheMangerOperation cacheManager = Mockito.mock(CacheMangerOperation.class); GenericTypeBusinessLogic genericTypeBusinessLogic = Mockito.mock(GenericTypeBusinessLogic.class); ForwardingPathOperation forwardingPathOperation = Mockito.mock(ForwardingPathOperation.class); @@ -162,7 +160,6 @@ public abstract class BaseServiceBusinessLogicTest { bl.setGenericTypeBusinessLogic(genericTypeBusinessLogic); bl.setComponentsUtils(componentsUtils); bl.setCassandraAuditingDao(auditingDao); - bl.setCacheManagerOperation(cacheManager); bl.setForwardingPathOperation(forwardingPathOperation); bl.setToscaOperationFacade(toscaOperationFacade); mockAuditingDaoLogic(); diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicTest.java index 5844047784..06f74c10e8 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogicTest.java @@ -70,7 +70,6 @@ import org.openecomp.sdc.be.model.operations.api.ICapabilityTypeOperation; import org.openecomp.sdc.be.model.operations.api.IElementOperation; import org.openecomp.sdc.be.model.operations.api.IInterfaceLifecycleOperation; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; -import org.openecomp.sdc.be.model.operations.impl.CacheMangerOperation; import org.openecomp.sdc.be.model.operations.impl.CsarOperation; import org.openecomp.sdc.be.model.operations.impl.GraphLockOperation; import org.openecomp.sdc.be.model.operations.impl.PropertyOperation; @@ -175,7 +174,6 @@ public class ResourceBusinessLogicTest { CsarBusinessLogic csarBusinessLogic = new CsarBusinessLogic(); Map<String, DataTypeDefinition> emptyDataTypes = new HashMap<>(); private GenericTypeBusinessLogic genericTypeBusinessLogic = Mockito.mock(GenericTypeBusinessLogic.class); - CacheMangerOperation cacheManager = Mockito.mock(CacheMangerOperation.class); List<Resource> reslist; public ResourceBusinessLogicTest() { @@ -257,7 +255,6 @@ public class ResourceBusinessLogicTest { bl.setPropertyOperation(propertyOperation); bl.setJanusGraphGenericDao(mockJanusGraphDao); bl.setApplicationDataTypeCache(applicationDataTypeCache); - bl.setCacheManagerOperation(cacheManager); bl.setGenericTypeBusinessLogic(genericTypeBusinessLogic); toscaOperationFacade.setNodeTypeOperation(nodeTypeOperation); toscaOperationFacade.setTopologyTemplateOperation(topologyTemplateOperation); diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceBusinessLogicTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceBusinessLogicTest.java index c8e3fd9a22..05ca32cbbc 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceBusinessLogicTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/components/impl/ServiceBusinessLogicTest.java @@ -47,7 +47,6 @@ import org.openecomp.sdc.be.model.category.CategoryDefinition; import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade; import org.openecomp.sdc.be.model.operations.api.IElementOperation; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; -import org.openecomp.sdc.be.model.operations.impl.CacheMangerOperation; import org.openecomp.sdc.be.model.operations.impl.GraphLockOperation; import org.openecomp.sdc.be.resources.data.auditing.DistributionDeployEvent; import org.openecomp.sdc.be.resources.data.auditing.DistributionNotificationEvent; @@ -93,7 +92,6 @@ public class ServiceBusinessLogicTest { private GraphLockOperation graphLockOperation = Mockito.mock(GraphLockOperation.class); private JanusGraphDao mockJanusGraphDao = Mockito.mock(JanusGraphDao.class); private ToscaOperationFacade toscaOperationFacade = Mockito.mock(ToscaOperationFacade.class); - private CacheMangerOperation cacheManager = Mockito.mock(CacheMangerOperation.class); private GenericTypeBusinessLogic genericTypeBusinessLogic = Mockito.mock(GenericTypeBusinessLogic.class); private UserValidations userValidations = Mockito.mock(UserValidations.class); private ResourceAdminEvent auditArchive1 = Mockito.mock(ResourceAdminEvent.class); @@ -171,7 +169,6 @@ public class ServiceBusinessLogicTest { bl.setGenericTypeBusinessLogic(genericTypeBusinessLogic); bl.setComponentsUtils(componentsUtils); bl.setCassandraAuditingDao(auditingDao); - bl.setCacheManagerOperation(cacheManager); bl.setUserValidations(userValidations); mockAuditingDaoLogic(); diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/components/path/beans/ComponentCassandraDaoMock.java b/catalog-be/src/test/java/org/openecomp/sdc/be/components/path/beans/ComponentCassandraDaoMock.java deleted file mode 100644 index cbe341230d..0000000000 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/components/path/beans/ComponentCassandraDaoMock.java +++ /dev/null @@ -1,89 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -package org.openecomp.sdc.be.components.path.beans; - -import fj.data.Either; -import org.apache.commons.lang3.tuple.ImmutablePair; -import org.openecomp.sdc.be.dao.api.ActionStatus; -import org.openecomp.sdc.be.dao.cassandra.CassandraClient; -import org.openecomp.sdc.be.dao.cassandra.CassandraOperationStatus; -import org.openecomp.sdc.be.dao.cassandra.ComponentCacheAccessor; -import org.openecomp.sdc.be.dao.cassandra.ComponentCassandraDao; -import org.openecomp.sdc.be.resources.data.ComponentCacheData; -import org.springframework.stereotype.Component; - -import javax.annotation.PostConstruct; -import java.util.List; -import java.util.Map; -import java.util.Set; - -@Component("component-cassandra-dao") -public class ComponentCassandraDaoMock extends ComponentCassandraDao { - - public static Integer DEFAULT_FETCH_SIZE = 500; - private ComponentCacheAccessor componentCacheAccessor; - - public ComponentCassandraDaoMock(CassandraClient cassandraClient) { - super(cassandraClient); - } - - @PostConstruct - public void init() { - - } - - public Either<List<ComponentCacheData>, ActionStatus> getComponents(List<String> ids) { - - return null; - } - - public Either<List<ComponentCacheData>, ActionStatus> getAllComponentIdTimeAndType() { - return null; - } - - - public Either<ComponentCacheData, ActionStatus> getComponent(String id) { - - return null; - } - - public CassandraOperationStatus saveComponent(ComponentCacheData componentCacheData) { - return null; - } - - - public Either<Boolean, CassandraOperationStatus> isTableEmpty(String tableName) { - return null; - } - - - public Either<ImmutablePair<List<ComponentCacheData>, Set<String>>, ActionStatus> getComponents( - Map<String, Long> idToTimestampMap) { - - return null; - } - - public CassandraOperationStatus deleteComponent(String id) { - return null; - } - - } - diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefServletTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefServletTest.java index 96eeaaf464..8036213f1e 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefServletTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/externalapi/servlet/ExternalRefServletTest.java @@ -54,7 +54,6 @@ import org.openecomp.sdc.be.model.Component; import org.openecomp.sdc.be.model.User; import org.openecomp.sdc.be.model.jsonjanusgraph.operations.*; import org.openecomp.sdc.be.model.jsonjanusgraph.utils.IdMapper; -import org.openecomp.sdc.be.model.operations.api.ICacheMangerOperation; import org.openecomp.sdc.be.model.operations.api.IGraphLockOperation; import org.openecomp.sdc.be.model.operations.impl.OperationUtils; import org.openecomp.sdc.be.servlets.exception.ComponentExceptionMapper; @@ -111,7 +110,6 @@ public class ExternalRefServletTest extends JerseyTest { private static final AccessValidations accessValidationsMock = Mockito.mock(AccessValidations.class); private static final ComponentLocker componentLocker = Mockito.mock(ComponentLocker.class); private static final HealingJanusGraphGenericDao janusGraphGenericDao = Mockito.mock(HealingJanusGraphGenericDao.class); - private static final ICacheMangerOperation cacheManagerOperation = Mockito.mock(ICacheMangerOperation.class); private static final IGraphLockOperation graphLockOperation = Mockito.mock(IGraphLockOperation.class); private static final String COMPONENT_ID = "ci-MyComponentName"; @@ -226,11 +224,6 @@ public class ExternalRefServletTest extends JerseyTest { } @Bean - ICacheMangerOperation cacheMangerOperation() { - return cacheManagerOperation; - } - - @Bean HealingJanusGraphDao janusGraphDao() { this.janusGraphDao = new HealingJanusGraphDao(healingPipelineDao(),janusGraphClient()); return janusGraphDao; diff --git a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArchiveEndpointTest.java b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArchiveEndpointTest.java index fc7ee951b8..50cd2570b9 100644 --- a/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArchiveEndpointTest.java +++ b/catalog-be/src/test/java/org/openecomp/sdc/be/servlets/ArchiveEndpointTest.java @@ -82,7 +82,6 @@ import org.openecomp.sdc.be.model.jsonjanusgraph.operations.NodeTemplateOperatio import org.openecomp.sdc.be.model.jsonjanusgraph.operations.NodeTypeOperation; import org.openecomp.sdc.be.model.jsonjanusgraph.operations.TopologyTemplateOperation; import org.openecomp.sdc.be.model.jsonjanusgraph.operations.ToscaOperationFacade; -import org.openecomp.sdc.be.model.operations.api.ICacheMangerOperation; import org.openecomp.sdc.be.model.operations.api.IGraphLockOperation; import org.openecomp.sdc.be.model.operations.api.StorageOperationStatus; import org.openecomp.sdc.be.servlets.exception.ComponentExceptionMapper; @@ -124,7 +123,6 @@ public class ArchiveEndpointTest extends JerseyTest { private static final HealingJanusGraphGenericDao janusGraphGenericDao = mock(HealingJanusGraphGenericDao.class); private static final HealingPipelineDao HEALING_PIPELINE_DAO = mock(HealingPipelineDao.class); - private static final ICacheMangerOperation cacheManagerOperation = mock(ICacheMangerOperation.class); private static GraphVertex serviceVertex; private static GraphVertex resourceVertex; private static GraphVertex resourceVertexVspArchived; @@ -206,11 +204,6 @@ public class ArchiveEndpointTest extends JerseyTest { } @Bean - ICacheMangerOperation cacheMangerOperation() { - return cacheManagerOperation; - } - - @Bean HealingJanusGraphDao janusGraphDao() { janusGraphDao = new HealingJanusGraphDao(healingPipelineDao(), janusGraphClient()); return janusGraphDao; |