diff options
author | kissand <andras.zoltan.kiss@est.tech> | 2022-09-23 13:49:05 +0200 |
---|---|---|
committer | Andras Zoltan Kiss <andras.zoltan.kiss@est.tech> | 2022-10-12 12:32:42 +0000 |
commit | d05c1d71f33c1d951d5a5196f6c206457431da9e (patch) | |
tree | 175b3ae4682d256dd971f046fcfd1169e5891a45 /cps-ncmp-service/src/test/groovy | |
parent | c9ec915d7d16b88f53493c85928d463d070df472 (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/groovy')
-rw-r--r-- | cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/NetworkCmProxyCmHandlerQueryServiceSpec.groovy | 4 |
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 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) |