From f6aa388616a47bad055e8c166e4bc2d61cebdc12 Mon Sep 17 00:00:00 2001 From: mojahidi Date: Tue, 15 May 2018 14:26:08 +0530 Subject: Removed logger.debug(, exception) Removed logger.debug(, exception) from code Change-Id: Ifc3d5947932027c3261c50a8f6275f5034576d60 Issue-ID: SDC-836 Signed-off-by: mojahidi --- .../impl/NetworkManagerImplTest.java | 21 +++------------- .../impl/NicManagerImplTest.java | 29 ++++++++++++---------- .../impl/ProcessManagerImplTest.java | 25 ++++++++++++------- 3 files changed, 36 insertions(+), 39 deletions(-) (limited to 'openecomp-be/backend') diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NetworkManagerImplTest.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NetworkManagerImplTest.java index b0d0b64ad8..92aa6e8540 100644 --- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NetworkManagerImplTest.java +++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NetworkManagerImplTest.java @@ -1,9 +1,6 @@ -/*- - * ============LICENSE_START======================================================= - * SDC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ +/* + * Copyright © 2018 European Support Limited + * * 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 @@ -15,8 +12,7 @@ * 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.vendorsoftwareproduct.impl; @@ -27,8 +23,6 @@ import org.mockito.MockitoAnnotations; import org.mockito.Spy; import org.openecomp.sdc.common.errors.CoreException; import org.openecomp.sdc.common.session.SessionContextProviderFactory; -import org.openecomp.sdc.logging.api.Logger; -import org.openecomp.sdc.logging.api.LoggerFactory; import org.openecomp.sdc.vendorsoftwareproduct.dao.NetworkDao; import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductInfoDao; import org.openecomp.sdc.vendorsoftwareproduct.dao.type.NetworkEntity; @@ -55,8 +49,6 @@ import static org.mockito.Mockito.verify; public class NetworkManagerImplTest { - private final Logger log = (Logger) LoggerFactory.getLogger(this.getClass().getName()); - private static final String VSP_ID = "vsp"; private static final String USER_ID = "test_user1"; private static final Version VERSION = new Version("version_id"); @@ -186,7 +178,6 @@ public class NetworkManagerImplTest { networkManager.createNetwork(network); Assert.fail(); } catch (CoreException exception) { - log.debug("", exception); Assert.assertEquals(exception.code().id(), expectedErrorCode); } } @@ -197,7 +188,6 @@ public class NetworkManagerImplTest { networkManager.getNetwork(vspId, version, networkId); Assert.fail(); } catch (CoreException exception) { - log.debug("", exception); Assert.assertEquals(exception.code().id(), expectedErrorCode); } } @@ -208,7 +198,6 @@ public class NetworkManagerImplTest { networkManager.updateNetwork(new NetworkEntity(vspId, version, networkId)); Assert.fail(); } catch (CoreException exception) { - log.debug("", exception); Assert.assertEquals(exception.code().id(), expectedErrorCode); } } @@ -218,7 +207,6 @@ public class NetworkManagerImplTest { networkManager.listNetworks(vspId, version); Assert.fail(); } catch (CoreException exception) { - log.debug("", exception); Assert.assertEquals(exception.code().id(), expectedErrorCode); } } @@ -230,7 +218,6 @@ public class NetworkManagerImplTest { networkManager.deleteNetwork(vspId, version, networkId); Assert.fail(); } catch (CoreException exception) { - log.debug("", exception); Assert.assertEquals(exception.code().id(), expectedErrorCode); } } diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NicManagerImplTest.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NicManagerImplTest.java index c63e5bd21b..9efb9e1d11 100644 --- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NicManagerImplTest.java +++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/NicManagerImplTest.java @@ -1,3 +1,19 @@ +/* + * Copyright © 2018 European Support Limited + * + * 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. +*/ + package org.openecomp.sdc.vendorsoftwareproduct.impl; import org.mockito.InjectMocks; @@ -5,8 +21,6 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; import org.mockito.Spy; import org.openecomp.sdc.common.errors.CoreException; -import org.openecomp.sdc.logging.api.Logger; -import org.openecomp.sdc.logging.api.LoggerFactory; import org.openecomp.sdc.vendorsoftwareproduct.NetworkManager; import org.openecomp.sdc.vendorsoftwareproduct.dao.NicDao; import org.openecomp.sdc.vendorsoftwareproduct.dao.VendorSoftwareProductInfoDao; @@ -38,8 +52,6 @@ import static org.mockito.Mockito.verify; public class NicManagerImplTest { - private final Logger log = (Logger) LoggerFactory.getLogger(this.getClass().getName()); - private static final String NIC_NOT_EXIST_MSG = "Vendor Software Product NIC with Id nic1 does not exist for Vendor Software Product with " + "id VSP_ID and version version_id"; @@ -137,7 +149,6 @@ public class NicManagerImplTest { try { NicEntity created = nicManager.createNic(nicEntity); } catch (CoreException exception) { - log.debug("", exception); Assert.assertEquals(VendorSoftwareProductErrorCodes.NIC_NAME_FORMAT_NOT_ALLOWED, exception.code().id()); } @@ -163,7 +174,6 @@ public class NicManagerImplTest { try { NicEntity created = nicManager.createNic(nicEntity); } catch (CoreException exception) { - log.debug("", exception); Assert.assertEquals("Invalid request, NIC with name " + nic.getName() + " already exist for component with ID " + nicEntity.getComponentId() + ".", exception.code().message()); @@ -186,7 +196,6 @@ public class NicManagerImplTest { try { NicEntity created = nicManager.createNic(nicEntity); } catch (CoreException exception) { - log.debug("", exception); Assert.assertEquals("Invalid request,NetworkId not allowed for External Networks", exception.code().message()); Assert @@ -210,7 +219,6 @@ public class NicManagerImplTest { try { NicEntity created = nicManager.createNic(nicEntity); } catch (CoreException exception) { - log.debug("", exception); Assert.assertEquals("Invalid request, Network Description not allowed for Internal Networks", exception.code().message()); Assert.assertEquals(VendorSoftwareProductErrorCodes @@ -359,7 +367,6 @@ public class NicManagerImplTest { nicManager.updateNic(nicEntity); Assert.fail(); } catch (CoreException ex) { - log.debug("", ex); Assert.assertEquals(VendorSoftwareProductErrorCodes.NIC_NAME_FORMAT_NOT_ALLOWED, ex.code().id()); } @@ -458,7 +465,6 @@ public class NicManagerImplTest { nicManager.createNic(nic); Assert.fail(); } catch (CoreException exception) { - log.debug("", exception); Assert.assertEquals(exception.code().id(), expectedErrorCode); } } @@ -469,7 +475,6 @@ public class NicManagerImplTest { nicManager.getNic(vspId, version, componentId, nicId); Assert.fail(); } catch (CoreException exception) { - log.debug("", exception); Assert.assertEquals(exception.code().id(), expectedErrorCode); } } @@ -480,7 +485,6 @@ public class NicManagerImplTest { nicManager.updateNic(new NicEntity(vspId, version, componentId, nicId)); Assert.fail(); } catch (CoreException exception) { - log.debug("", exception); Assert.assertEquals(exception.code().id(), expectedErrorCode); } } @@ -491,7 +495,6 @@ public class NicManagerImplTest { nicManager.deleteNic(vspId, version, componentId, nicId); Assert.fail(); } catch (CoreException exception) { - log.debug("", exception); Assert.assertEquals(exception.code().id(), expectedErrorCode); } } diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ProcessManagerImplTest.java b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ProcessManagerImplTest.java index cb2ff421f2..328f21ab47 100644 --- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ProcessManagerImplTest.java +++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/src/test/java/org/openecomp/sdc/vendorsoftwareproduct/impl/ProcessManagerImplTest.java @@ -1,3 +1,19 @@ +/* + * Copyright © 2018 European Support Limited + * + * 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. +*/ + package org.openecomp.sdc.vendorsoftwareproduct.impl; import org.mockito.ArgumentCaptor; @@ -10,8 +26,6 @@ import org.openecomp.sdc.activitylog.dao.type.ActivityLogEntity; import org.openecomp.sdc.common.errors.CoreException; import org.openecomp.sdc.common.errors.ErrorCategory; import org.openecomp.sdc.common.errors.ErrorCode; -import org.openecomp.sdc.logging.api.Logger; -import org.openecomp.sdc.logging.api.LoggerFactory; import org.openecomp.sdc.vendorsoftwareproduct.dao.ProcessDao; import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessEntity; import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ProcessType; @@ -38,8 +52,6 @@ import static org.mockito.Mockito.verify; public class ProcessManagerImplTest { - private final Logger log = (Logger) LoggerFactory.getLogger(this.getClass().getName()); - private static final String USER1 = "processesTestUser"; private static final String VSP_ID = "vsp"; private static final Version VERSION = new Version(0, 1); @@ -311,7 +323,6 @@ public class ProcessManagerImplTest { processManager.getProcess(vspId, version, componentId, processId); Assert.fail(); } catch (CoreException exception) { - log.debug("", exception); Assert.assertEquals(exception.code().id(), expectedErrorCode); } } @@ -324,7 +335,6 @@ public class ProcessManagerImplTest { .updateProcess(new ProcessEntity(vspId, version, componentId, processId)); Assert.fail(); } catch (CoreException exception) { - log.debug("", exception); Assert.assertEquals(exception.code().id(), expectedErrorCode); } } @@ -335,7 +345,6 @@ public class ProcessManagerImplTest { processManager.getProcessArtifact(vspId, version, componentId, processId); Assert.fail(); } catch (CoreException exception) { - log.debug("", exception); Assert.assertEquals(exception.code().id(), expectedErrorCode); } } @@ -349,7 +358,6 @@ public class ProcessManagerImplTest { vspId, version, componentId, processId); Assert.fail(); } catch (CoreException exception) { - log.error("", exception); Assert.assertEquals(exception.code().id(), expectedErrorCode); } } @@ -360,7 +368,6 @@ public class ProcessManagerImplTest { processManager.deleteProcessArtifact(vspId, VERSION, componentId, processId); Assert.fail(); } catch (CoreException exception) { - log.debug("", exception); Assert.assertEquals(exception.code().id(), expectedErrorCode); } } -- cgit 1.2.3-korg