2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2025 Nordix Foundation
4 * ================================================================================
5 * Licensed under the Apache License, Version 2.0 (the 'License');
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an 'AS IS' BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 * SPDX-License-Identifier: Apache-2.0
18 * ============LICENSE_END=========================================================
21 package org.onap.cps.integration.performance.ncmp
23 import org.onap.cps.integration.ResourceMeter
24 import org.onap.cps.integration.base.CpsIntegrationSpecBase
27 * This test does not depend on common performance test data. Hence it just extends the integration spec base.
29 class AlternateIdPerfTest extends CpsIntegrationSpecBase {
31 def resourceMeter = new ResourceMeter()
33 def 'Alternate Id Lookup Performance.'() {
34 given: 'register 1,000 cm handles (with alternative ids)'
35 registerSequenceOfCmHandlesWithManyModuleReferencesButDoNotWaitForReady(DMI1_URL, 'tagA', 1000, 1)
36 when: 'perform a 1,000 lookups by alternate id'
39 networkCmProxyInventoryFacade.getNcmpServiceCmHandle("alt=${it}")
42 then: 'record the result. Not asserted, just recorded in See https://lf-onap.atlassian.net/browse/CPS-2605'
43 println "*** CPS-2605 Execution time: ${resourceMeter.totalTimeInSeconds} ms"
44 cleanup: 'deregister test cm handles'
45 deregisterSequenceOfCmHandles(DMI1_URL, 1000, 1)