From d05c1d71f33c1d951d5a5196f6c206457431da9e Mon Sep 17 00:00:00 2001 From: kissand Date: Fri, 23 Sep 2022 13:49:05 +0200 Subject: 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 --- .../cps/ncmp/api/impl/NetworkCmProxyCmHandlerQueryServiceSpec.groovy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cps-ncmp-service/src/test/groovy') 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 f76316f9cc..eea53e82d9 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) -- cgit 1.2.3-korg