diff options
5 files changed, 6 insertions, 9 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/DmiModelOperations.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/DmiModelOperations.java index a056efd6ce..2d45103904 100644 --- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/DmiModelOperations.java +++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/DmiModelOperations.java @@ -34,7 +34,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; import org.onap.cps.ncmp.api.inventory.models.YangResource; import org.onap.cps.ncmp.impl.dmi.DmiProperties; import org.onap.cps.ncmp.impl.dmi.DmiRestClient; @@ -50,7 +49,6 @@ import org.springframework.stereotype.Service; /** * Operations class for DMI Model. */ -@Slf4j @RequiredArgsConstructor @Service public class DmiModelOperations { diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/dmi/DmiOperationsBaseSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/dmi/DmiOperationsBaseSpec.groovy index e479fffe87..d00d3ab8f6 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/dmi/DmiOperationsBaseSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/dmi/DmiOperationsBaseSpec.groovy @@ -44,7 +44,6 @@ abstract class DmiOperationsBaseSpec extends Specification { ObjectMapper spyObjectMapper = Spy() def yangModelCmHandle = new YangModelCmHandle() - def otherYangModelCmHandle = new YangModelCmHandle() def static dmiServiceName = 'myServiceName' def static cmHandleId = 'some-cm-handle' def static alternateId = 'alt-id-' + cmHandleId diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncServiceSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncServiceSpec.groovy index 2f13a9a483..f5c4ea4369 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncServiceSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncServiceSpec.groovy @@ -91,7 +91,7 @@ class ModuleSyncServiceSpec extends Specification { def yangModelCmHandle = createAdvisedCmHandle(moduleSetTag) and: 'the service returns a list of module references when queried with the specified attributes' mockCpsModuleService.getModuleReferencesByAttribute(*_) >> [new ModuleReference('module1', '1')] - and: 'exception occurs when try to store result' + and: 'exception occurs when trying to store result' def testException = new RuntimeException('test') mockCpsModuleService.createSchemaSetFromModules(*_) >> { throw testException } when: 'module sync is triggered' @@ -110,7 +110,7 @@ class ModuleSyncServiceSpec extends Specification { def 'Sync models for a cm handle with previously cached module set tag.'() { given: 'a cm handle to be synced' def yangModelCmHandle = createAdvisedCmHandle('cached-tag') - and: 'The module set tag exist in the private cache' + and: 'The module set tag exists in the private cache' def moduleReferences = [ new ModuleReference('module1','1') ] def cachedModuleDelta = new ModuleDelta(moduleReferences, [:]) objectUnderTest.privateModuleSetCache.put('cached-tag', cachedModuleDelta) @@ -125,7 +125,7 @@ class ModuleSyncServiceSpec extends Specification { def 'Attempt to sync using a module set tag already being processed by a different instance or thread.'() { given: 'a cm handle to be synced' def yangModelCmHandle = createAdvisedCmHandle('duplicateTag') - and: 'The module set tag already exist in the processing semaphore set' + and: 'The module set tag already exists in the processing semaphore set' mockModuleSetTagsBeingProcessed.add('duplicate-processing-tag') > false when: 'module sync is triggered' objectUnderTest.syncAndCreateSchemaSetAndAnchor(yangModelCmHandle) diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/base/CpsIntegrationSpecBase.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/base/CpsIntegrationSpecBase.groovy index 02a10cfa6b..aea5c10a93 100644 --- a/integration-test/src/test/groovy/org/onap/cps/integration/base/CpsIntegrationSpecBase.groovy +++ b/integration-test/src/test/groovy/org/onap/cps/integration/base/CpsIntegrationSpecBase.groovy @@ -266,9 +266,9 @@ abstract class CpsIntegrationSpecBase extends Specification { def registerSequenceOfCmHandlesWithManyModuleReferencesButDoNotWaitForReady(dmiPlugin, moduleSetTag, numberOfCmHandles, offset) { def cmHandles = [] def id = offset - def moduleReferences = (1..200).collect { moduleSetTag + '_Module_' + it.toString() } + def moduleReferences = (1..200).collect { "${moduleSetTag}Module${it}" } (1..numberOfCmHandles).each { - def ncmpServiceCmHandle = new NcmpServiceCmHandle(cmHandleId: 'ch-'+id, moduleSetTag: moduleSetTag, alternateId: NO_ALTERNATE_ID) + def ncmpServiceCmHandle = new NcmpServiceCmHandle(cmHandleId: "ch-${id}", moduleSetTag: moduleSetTag, alternateId: NO_ALTERNATE_ID) cmHandles.add(ncmpServiceCmHandle) dmiDispatcher1.moduleNamesPerCmHandleId[ncmpServiceCmHandle.cmHandleId] = moduleReferences dmiDispatcher2.moduleNamesPerCmHandleId[ncmpServiceCmHandle.cmHandleId] = moduleReferences diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/ModuleSyncWatchdogIntegrationSpec.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/ModuleSyncWatchdogIntegrationSpec.groovy index 963bc1fe61..20fa546eba 100644 --- a/integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/ModuleSyncWatchdogIntegrationSpec.groovy +++ b/integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/ModuleSyncWatchdogIntegrationSpec.groovy @@ -132,7 +132,7 @@ class ModuleSyncWatchdogIntegrationSpec extends CpsIntegrationSpecBase { } def logInstrumentation(timer, description) { - System.out.println('*** CPS-2478, ' + description + ' : ' + timer.count()+ ' times, total ' + timer.totalTime(TimeUnit.MILLISECONDS) + ' ms') + println "*** CPS-2478, $description : Invoked ${timer.count()} times, Total Time: ${timer.totalTime(TimeUnit.MILLISECONDS)} ms, Mean Time: ${timer.mean(TimeUnit.MILLISECONDS)} ms" return true } |