Fix PASS/FAIL reporting in performance test summary 11/136511/1
authordanielhanrahan <daniel.hanrahan@est.tech>
Mon, 13 Nov 2023 19:17:45 +0000 (19:17 +0000)
committerdanielhanrahan <daniel.hanrahan@est.tech>
Mon, 13 Nov 2023 19:17:45 +0000 (19:17 +0000)
Performance test summary says PASS even if the memory limit
is exceeded. It currently only looks at time.

Issue-ID: CPS-1753
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I6b9d5ae8e8f560459ba77cdb8fe8b889d0dc7a8a

integration-test/src/test/groovy/org/onap/cps/integration/performance/base/PerfTestBase.groovy

index b0a105c..a96d7f6 100644 (file)
@@ -55,7 +55,7 @@ abstract class PerfTestBase extends CpsIntegrationSpecBase {
     abstract def createInitialData()
 
     def recordAndAssertResourceUsage(String shortTitle, double thresholdInSec, double recordedTimeInSec, memoryLimit, memoryUsageInMB) {
-        def pass = recordedTimeInSec <= thresholdInSec
+        def pass = recordedTimeInSec <= thresholdInSec && memoryUsageInMB <= memoryLimit
         if (shortTitle.length() > 40) {
             shortTitle = shortTitle.substring(0, 40)
         }