Merge "CmHandle delete is failing with InternalServerError: Null key is not allowed...
[cps.git] / integration-test / src / test / groovy / org / onap / cps / integration / performance / base / CpsPerfTestBase.groovy
index 8cdbdc5..68dfb4a 100644 (file)
@@ -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, 200, 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, 200, resourceMeter.getTotalMemoryUsageInMB())
+            recordAndAssertResourceUsage("Warming database", 100, durationInSeconds, 600, resourceMeter.getTotalMemoryUsageInMB())
     }
 
 }