diff options
author | ToineSiebelink <toine.siebelink@est.tech> | 2024-11-25 09:37:31 +0000 |
---|---|---|
committer | ToineSiebelink <toine.siebelink@est.tech> | 2024-11-25 09:37:31 +0000 |
commit | 295495b3f4376f42c5788e89725aef0466a8a578 (patch) | |
tree | 759ed5eb6ca33abd1bdcca5f321bf74b3a226ac4 /cps-ncmp-service/src | |
parent | fd5b04c51451cb0525d7ed93b1bb9b53573f6aaa (diff) |
Registration Optimization remaining Code Comments
Issue-ID: CPS-2478
Change-Id: I0aa3804225f053ff99176056fe71322a23cff31c
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
Diffstat (limited to 'cps-ncmp-service/src')
3 files changed, 3 insertions, 6 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) |