From f1a506a235abe624704cfdd17aadbfe1760c4c04 Mon Sep 17 00:00:00 2001 From: danielhanrahan Date: Wed, 26 Jul 2023 15:50:06 +0100 Subject: Some performance tests are skipped due to filename CPS POM is setup so that only files ending in 'Spec' or 'Test' are run as tests, and files ending in 'PerfTest' will only run in the 'include-performance' profile. The 32K limit tests are currently being skipped always, as they do not end in 'Spec', 'Test', or 'PerfTest'. This commit renames them to PerfTest. Issue-ID: CPS-1811 Signed-off-by: danielhanrahan Change-Id: I75a4ae92edf324213f734503c23dedb2b31fd007 --- .../performance/cps/CpsAdminServiceLimits.groovy | 50 ----------------- .../cps/CpsAdminServiceLimitsPerfTest.groovy | 50 +++++++++++++++++ .../performance/cps/CpsDataServiceLimits.groovy | 63 ---------------------- .../cps/CpsDataServiceLimitsPerfTest.groovy | 63 ++++++++++++++++++++++ 4 files changed, 113 insertions(+), 113 deletions(-) delete mode 100644 integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/CpsAdminServiceLimits.groovy create mode 100644 integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/CpsAdminServiceLimitsPerfTest.groovy delete mode 100644 integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/CpsDataServiceLimits.groovy create mode 100644 integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/CpsDataServiceLimitsPerfTest.groovy (limited to 'integration-test/src') diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/CpsAdminServiceLimits.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/CpsAdminServiceLimits.groovy deleted file mode 100644 index 0034af453b..0000000000 --- a/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/CpsAdminServiceLimits.groovy +++ /dev/null @@ -1,50 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2023 Nordix Foundation - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.cps.integration.performance.cps - -import org.onap.cps.api.CpsAdminService -import org.onap.cps.integration.performance.base.CpsPerfTestBase - -class CpsAdminServiceLimits extends CpsPerfTestBase { - - CpsAdminService objectUnderTest - - def setup() { objectUnderTest = cpsAdminService } - - def 'Get anchors from multiple schema set names limit exceeded: 32,766 (~ 2^15) schema set names.'() { - given: 'more than 32,766 schema set names' - def schemaSetNames = (0..40_000).collect { "size-of-this-name-does-not-matter-for-limit-" + it } - when: 'single get is executed to get all the anchors' - objectUnderTest.getAnchors(CPS_PERFORMANCE_TEST_DATASPACE, schemaSetNames) - then: 'a database exception is not thrown' - noExceptionThrown() - } - - def 'Querying anchor names limit exceeded: 32,766 (~ 2^15) modules.'() { - given: 'more than 32,766 module names' - def moduleNames = (0..40_000).collect { "size-of-this-name-does-not-matter-for-limit-" + it } - when: 'single query is executed to get all the anchors' - objectUnderTest.queryAnchorNames(CPS_PERFORMANCE_TEST_DATASPACE, moduleNames) - then: 'a database exception is not thrown' - noExceptionThrown() - } - -} diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/CpsAdminServiceLimitsPerfTest.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/CpsAdminServiceLimitsPerfTest.groovy new file mode 100644 index 0000000000..9ea7a7b53a --- /dev/null +++ b/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/CpsAdminServiceLimitsPerfTest.groovy @@ -0,0 +1,50 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2023 Nordix Foundation + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.cps.integration.performance.cps + +import org.onap.cps.api.CpsAdminService +import org.onap.cps.integration.performance.base.CpsPerfTestBase + +class CpsAdminServiceLimitsPerfTest extends CpsPerfTestBase { + + CpsAdminService objectUnderTest + + def setup() { objectUnderTest = cpsAdminService } + + def 'Get anchors from multiple schema set names limit exceeded: 32,766 (~ 2^15) schema set names.'() { + given: 'more than 32,766 schema set names' + def schemaSetNames = (0..40_000).collect { "size-of-this-name-does-not-matter-for-limit-" + it } + when: 'single get is executed to get all the anchors' + objectUnderTest.getAnchors(CPS_PERFORMANCE_TEST_DATASPACE, schemaSetNames) + then: 'a database exception is not thrown' + noExceptionThrown() + } + + def 'Querying anchor names limit exceeded: 32,766 (~ 2^15) modules.'() { + given: 'more than 32,766 module names' + def moduleNames = (0..40_000).collect { "size-of-this-name-does-not-matter-for-limit-" + it } + when: 'single query is executed to get all the anchors' + objectUnderTest.queryAnchorNames(CPS_PERFORMANCE_TEST_DATASPACE, moduleNames) + then: 'a database exception is not thrown' + noExceptionThrown() + } + +} diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/CpsDataServiceLimits.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/CpsDataServiceLimits.groovy deleted file mode 100644 index 1579470eab..0000000000 --- a/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/CpsDataServiceLimits.groovy +++ /dev/null @@ -1,63 +0,0 @@ -/* - * ============LICENSE_START======================================================= - * Copyright (C) 2023 Nordix Foundation - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.cps.integration.performance.cps - -import java.time.OffsetDateTime -import org.onap.cps.api.CpsDataService -import org.onap.cps.integration.performance.base.CpsPerfTestBase -import org.onap.cps.spi.exceptions.DataNodeNotFoundException - -import static org.onap.cps.spi.FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS - -class CpsDataServiceLimits extends CpsPerfTestBase { - - CpsDataService objectUnderTest - - def setup() { objectUnderTest = cpsDataService } - - def 'Multiple get limit exceeded: 32,764 (~ 2^15) xpaths.'() { - given: 'more than 32,764 xpaths' - def xpaths = (0..40_000).collect { "/size/of/this/path/does/not/matter/for/limit[@id='" + it + "']" } - when: 'single operation is executed to get all datanodes with given xpaths' - objectUnderTest.getDataNodesForMultipleXpaths(CPS_PERFORMANCE_TEST_DATASPACE, 'bookstore1', xpaths, INCLUDE_ALL_DESCENDANTS) - then: 'a database exception is not thrown' - noExceptionThrown() - } - - def 'Delete multiple datanodes limit exceeded: 32,767 (~ 2^15) xpaths.'() { - given: 'more than 32,767 xpaths' - def xpaths = (0..40_000).collect { "/size/of/this/path/does/not/matter/for/limit[@id='" + it + "']" } - when: 'single operation is executed to delete all datanodes with given xpaths' - objectUnderTest.deleteDataNodes(CPS_PERFORMANCE_TEST_DATASPACE, 'bookstore1', xpaths, OffsetDateTime.now()) - then: 'a database exception is not thrown (but a CPS DataNodeNotFoundException is thrown)' - thrown(DataNodeNotFoundException.class) - } - - def 'Delete datanodes from multiple anchors limit exceeded: 32,766 (~ 2^15) anchors.'() { - given: 'more than 32,766 anchor names' - def anchorNames = (0..40_000).collect { "size-of-this-name-does-not-matter-for-limit-" + it } - when: 'single operation is executed to delete all datanodes in given anchors' - objectUnderTest.deleteDataNodes(CPS_PERFORMANCE_TEST_DATASPACE, anchorNames, OffsetDateTime.now()) - then: 'a database exception is not thrown' - noExceptionThrown() - } - -} diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/CpsDataServiceLimitsPerfTest.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/CpsDataServiceLimitsPerfTest.groovy new file mode 100644 index 0000000000..e0df2fee77 --- /dev/null +++ b/integration-test/src/test/groovy/org/onap/cps/integration/performance/cps/CpsDataServiceLimitsPerfTest.groovy @@ -0,0 +1,63 @@ +/* + * ============LICENSE_START======================================================= + * Copyright (C) 2023 Nordix Foundation + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * ============LICENSE_END========================================================= + */ + +package org.onap.cps.integration.performance.cps + +import java.time.OffsetDateTime +import org.onap.cps.api.CpsDataService +import org.onap.cps.integration.performance.base.CpsPerfTestBase +import org.onap.cps.spi.exceptions.DataNodeNotFoundException + +import static org.onap.cps.spi.FetchDescendantsOption.INCLUDE_ALL_DESCENDANTS + +class CpsDataServiceLimitsPerfTest extends CpsPerfTestBase { + + CpsDataService objectUnderTest + + def setup() { objectUnderTest = cpsDataService } + + def 'Multiple get limit exceeded: 32,764 (~ 2^15) xpaths.'() { + given: 'more than 32,764 xpaths' + def xpaths = (0..40_000).collect { "/size/of/this/path/does/not/matter/for/limit[@id='" + it + "']" } + when: 'single operation is executed to get all datanodes with given xpaths' + objectUnderTest.getDataNodesForMultipleXpaths(CPS_PERFORMANCE_TEST_DATASPACE, 'bookstore1', xpaths, INCLUDE_ALL_DESCENDANTS) + then: 'a database exception is not thrown' + noExceptionThrown() + } + + def 'Delete multiple datanodes limit exceeded: 32,767 (~ 2^15) xpaths.'() { + given: 'more than 32,767 xpaths' + def xpaths = (0..40_000).collect { "/size/of/this/path/does/not/matter/for/limit[@id='" + it + "']" } + when: 'single operation is executed to delete all datanodes with given xpaths' + objectUnderTest.deleteDataNodes(CPS_PERFORMANCE_TEST_DATASPACE, 'bookstore1', xpaths, OffsetDateTime.now()) + then: 'a database exception is not thrown (but a CPS DataNodeNotFoundException is thrown)' + thrown(DataNodeNotFoundException.class) + } + + def 'Delete datanodes from multiple anchors limit exceeded: 32,766 (~ 2^15) anchors.'() { + given: 'more than 32,766 anchor names' + def anchorNames = (0..40_000).collect { "size-of-this-name-does-not-matter-for-limit-" + it } + when: 'single operation is executed to delete all datanodes in given anchors' + objectUnderTest.deleteDataNodes(CPS_PERFORMANCE_TEST_DATASPACE, anchorNames, OffsetDateTime.now()) + then: 'a database exception is not thrown' + noExceptionThrown() + } + +} -- cgit 1.2.3-korg