X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=integration-test%2Fsrc%2Ftest%2Fgroovy%2Forg%2Fonap%2Fcps%2Fintegration%2Fperformance%2Fbase%2FCpsPerfTestBase.groovy;h=68dfb4a790813d5e14d66c5917425c1ee6ae72fa;hb=8bcb8ee9f7edbf12d3300f34642e2efacabe4ea8;hp=d8012ec6d41dda0a6cafdbbc4869e21bcc7f6117;hpb=b5d03c741caac8c255e20a1245f709045c238e90;p=cps.git diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/performance/base/CpsPerfTestBase.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/performance/base/CpsPerfTestBase.groovy index d8012ec6d..68dfb4a79 100644 --- a/integration-test/src/test/groovy/org/onap/cps/integration/performance/base/CpsPerfTestBase.groovy +++ b/integration-test/src/test/groovy/org/onap/cps/integration/performance/base/CpsPerfTestBase.groovy @@ -1,6 +1,6 @@ /* * ============LICENSE_START======================================================= - * Copyright (C) 2023 Nordix Foundation + * Copyright (C) 2023-2024 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the 'License'); * you may not use this file except in compliance with the License. @@ -43,9 +43,8 @@ class CpsPerfTestBase extends PerfTestBase { } def setupPerformanceInfraStructure() { - cpsAdminService.createDataspace(CPS_PERFORMANCE_TEST_DATASPACE) - def modelAsString = readResourceDataFile('bookstore/bookstore.yang') - cpsModuleService.createSchemaSet(CPS_PERFORMANCE_TEST_DATASPACE, BOOKSTORE_SCHEMA_SET, [bookstore: modelAsString]) + cpsDataspaceService.createDataspace(CPS_PERFORMANCE_TEST_DATASPACE) + createStandardBookStoreSchemaSet(CPS_PERFORMANCE_TEST_DATASPACE) } def createInitialData() { @@ -67,7 +66,7 @@ class CpsPerfTestBase extends PerfTestBase { addAnchorsWithData(OPENROADM_ANCHORS, CPS_PERFORMANCE_TEST_DATASPACE, LARGE_SCHEMA_SET, 'openroadm', data) resourceMeter.stop() def durationInSeconds = resourceMeter.getTotalTimeInSeconds() - recordAndAssertResourceUsage('Creating openroadm anchors with large data tree', 200, durationInSeconds, 600, resourceMeter.getTotalMemoryUsageInMB()) + recordAndAssertResourceUsage('Creating openroadm anchors with large data tree', 100, durationInSeconds, 600, resourceMeter.getTotalMemoryUsageInMB()) } def generateOpenRoadData(numberOfNodes) { @@ -87,7 +86,7 @@ class CpsPerfTestBase extends PerfTestBase { then: 'memory used is within #peakMemoryUsage' assert resourceMeter.getTotalMemoryUsageInMB() <= 30 and: 'all data is read within expected time' - recordAndAssertResourceUsage("Warming database", 200, durationInSeconds, 600, resourceMeter.getTotalMemoryUsageInMB()) + recordAndAssertResourceUsage("Warming database", 100, durationInSeconds, 600, resourceMeter.getTotalMemoryUsageInMB()) } }