aboutsummaryrefslogtreecommitdiffstats
path: root/integration-test/src/test/groovy
diff options
context:
space:
mode:
authordanielhanrahan <daniel.hanrahan@est.tech>2023-05-02 20:01:34 +0100
committerdanielhanrahan <daniel.hanrahan@est.tech>2023-05-04 16:19:00 +0100
commit7fd71f5bd31fa0e4faf07cd296be665017a59c77 (patch)
tree1394b6e899092b4332921be828d4baa15c6bec4b /integration-test/src/test/groovy
parentc863070591268662eced18e04ba52b96897ce7bd (diff)
Fix and refactor query across anchors (CPS-1664 #3)
- Fix CPS-1580: Query Across All Anchors Does NOT Filter on Dataspace - Fix CPS-1582: NullPointerException in queryDataNodesAcrossAnchors - Improve performance of queryDataNodesAcrossAnchors - Refactor queryDataNodes - Refactor FragmentQueryBuilder Issue-ID: CPS-1580 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I8b83d4c580280d8719ab2ac33f3914f53e798774
Diffstat (limited to 'integration-test/src/test/groovy')
-rw-r--r--integration-test/src/test/groovy/org/onap/cps/integration/functional/CpsQueryServiceIntegrationSpec.groovy4
-rw-r--r--integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/QueryPerfTest.groovy3
2 files changed, 1 insertions, 6 deletions
diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/functional/CpsQueryServiceIntegrationSpec.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/functional/CpsQueryServiceIntegrationSpec.groovy
index 4e596da14d..d64617caf8 100644
--- a/integration-test/src/test/groovy/org/onap/cps/integration/functional/CpsQueryServiceIntegrationSpec.groovy
+++ b/integration-test/src/test/groovy/org/onap/cps/integration/functional/CpsQueryServiceIntegrationSpec.groovy
@@ -25,7 +25,6 @@ import org.onap.cps.api.CpsQueryService
import org.onap.cps.integration.base.FunctionalSpecBase
import org.onap.cps.spi.FetchDescendantsOption
import org.onap.cps.spi.exceptions.CpsPathException
-import spock.lang.Ignore
import static org.onap.cps.spi.FetchDescendantsOption.DIRECT_CHILDREN_ONLY
import static org.onap.cps.spi.FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS
@@ -235,7 +234,6 @@ class CpsQueryServiceIntegrationSpec extends FunctionalSpecBase {
thrown(CpsPathException)
}
- @Ignore
def 'Cps Path query across anchors with #scenario.'() {
when: 'a query is executed to get a data nodes across anchors by the given CpsPath'
def result = objectUnderTest.queryDataNodesAcrossAnchors(FUNCTIONAL_TEST_DATASPACE_1, cpsPath, OMIT_DESCENDANTS)
@@ -261,7 +259,6 @@ class CpsQueryServiceIntegrationSpec extends FunctionalSpecBase {
'ancestor combined with text condition' | '//books/title[text()="Matilda"]/ancestor::bookstore' || ["/bookstore"]
}
- @Ignore
def 'Cps Path query across anchors with #scenario descendants.'() {
when: 'a query is executed to get a data node by the given cps path'
def result = objectUnderTest.queryDataNodesAcrossAnchors(FUNCTIONAL_TEST_DATASPACE_1, '/bookstore', fetchDescendantsOption)
@@ -276,7 +273,6 @@ class CpsQueryServiceIntegrationSpec extends FunctionalSpecBase {
'all' | INCLUDE_ALL_DESCENDANTS || 17
}
- @Ignore
def 'Cps Path query across anchors with ancestors and #scenario descendants.'() {
when: 'a query is executed to get a data node by the given cps path'
def result = objectUnderTest.queryDataNodesAcrossAnchors(FUNCTIONAL_TEST_DATASPACE_1, '//books/ancestor::bookstore', fetchDescendantsOption)
diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/QueryPerfTest.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/QueryPerfTest.groovy
index 065365748c..0af01ac77b 100644
--- a/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/QueryPerfTest.groovy
+++ b/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/QueryPerfTest.groovy
@@ -63,8 +63,7 @@ class QueryPerfTest extends CpsPerfTestBase {
recordAndAssertPerformance("Query across anchors ${scenario}", durationLimit, durationInMillis)
where: 'the following parameters are used'
scenario | cpspath || durationLimit | expectedNumberOfDataNodes
- // FIXME Current implementation of queryDataNodesAcrossAnchors throws NullPointerException for next case. Uncomment after CPS-1582 is done.
- // 'top element' | '/openroadm-devices' || 1 | 5 * (50 * 86 + 1)
+ 'top element' | '/openroadm-devices' || 1 | 5 * (50 * 86 + 1)
'leaf condition' | '//openroadm-device[@ne-state="inservice"]' || 2500 | 5 * (50 * 86)
'ancestors' | '//openroadm-device/ancestor::openroadm-devices' || 12000 | 5 * (50 * 86 + 1)
'leaf condition + ancestors' | '//openroadm-device[@status="success"]/ancestor::openroadm-devices' || 1000 | 5 * (50 * 86 + 1)