summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-service/src/test
diff options
context:
space:
mode:
authorkissand <andras.zoltan.kiss@est.tech>2022-09-23 13:49:05 +0200
committerAndras Zoltan Kiss <andras.zoltan.kiss@est.tech>2022-10-12 12:32:42 +0000
commitd05c1d71f33c1d951d5a5196f6c206457431da9e (patch)
tree175b3ae4682d256dd971f046fcfd1169e5891a45 /cps-ncmp-service/src/test
parentc9ec915d7d16b88f53493c85928d463d070df472 (diff)
Fix Id-searches endpoint performance degradation
- create more flexible control over fetch descendants - add a new FETCH_DIRECT_CHILDREN_ONLY option to fetch descendants options - enabel create custom fetch descendants option Reviewer: Toine, Joe, Priyank Issue-ID: CPS-1216 Change-Id: I900b32e813367aa9566c1dec986b20f009d27203 Signed-off-by: kissand <andras.zoltan.kiss@est.tech>
Diffstat (limited to 'cps-ncmp-service/src/test')
-rw-r--r--cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyCmHandlerQueryServiceSpec.groovy4
1 files changed, 3 insertions, 1 deletions
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyCmHandlerQueryServiceSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyCmHandlerQueryServiceSpec.groovy
index f76316f9c..eea53e82d 100644
--- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyCmHandlerQueryServiceSpec.groovy
+++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyCmHandlerQueryServiceSpec.groovy
@@ -153,7 +153,9 @@ class NetworkCmProxyCmHandlerQueryServiceSpec extends Specification {
def 'Retrieve cm handles when the query is empty.'() {
given: 'We use an empty query'
def cmHandleQueryParameters = new CmHandleQueryServiceParameters()
- and: 'the inventory persistence returns the dmi registry datanode'
+ and: 'the inventory persistence returns the dmi registry datanode with just ids'
+ inventoryPersistence.getDataNode("/dmi-registry", FetchDescendantsOption.FETCH_DIRECT_CHILDREN_ONLY) >> dmiRegistry
+ and: 'the inventory persistence returns the dmi registry datanode with data'
inventoryPersistence.getDataNode("/dmi-registry") >> dmiRegistry
when: 'the query is executed for both cm handle ids and details'
def returnedCmHandlesJustIds = objectUnderTest.queryCmHandleIds(cmHandleQueryParameters)