aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhalil.cakal <halil.cakal@est.tech>2024-12-09 17:38:35 +0000
committerhalil.cakal <halil.cakal@est.tech>2024-12-10 14:22:43 +0000
commit001a1c3230c9d0e8b19a7722638469a9a8cb658e (patch)
treec98415ff331fa8edcca144833ed044fff07a554d
parentf325ca432bae326cc279c85907543ccf3f45400c (diff)
Extend the container-up time after the tests finished
- extend it 5 mins for kpi test suit - extend it 7 mins for endurance test suit Issue-ID: CPS-2535 Change-Id: Ifecf2cdea67c12ff671da5f90e6715de7089e755 Signed-off-by: halil.cakal <halil.cakal@est.tech>
-rw-r--r--k6-tests/ncmp/common/utils.js1
-rw-r--r--k6-tests/ncmp/config/endurance.json3
-rw-r--r--k6-tests/ncmp/config/kpi.json3
-rw-r--r--k6-tests/ncmp/ncmp-test-runner.js6
4 files changed, 9 insertions, 4 deletions
diff --git a/k6-tests/ncmp/common/utils.js b/k6-tests/ncmp/common/utils.js
index 589a2482e6..8e68edd438 100644
--- a/k6-tests/ncmp/common/utils.js
+++ b/k6-tests/ncmp/common/utils.js
@@ -24,6 +24,7 @@ export const testConfig = JSON.parse(open(`../config/${__ENV.TEST_PROFILE}.json`
export const KAFKA_BOOTSTRAP_SERVERS = testConfig.hosts.kafkaBootstrapServer;
export const NCMP_BASE_URL = testConfig.hosts.ncmpBaseUrl;
export const DMI_PLUGIN_URL = testConfig.hosts.dmiStubUrl;
+export const CONTAINER_UP_TIME_IN_SECONDS = testConfig.hosts.containerUpTimeInSeconds;
export const LEGACY_BATCH_TOPIC_NAME = 'legacy_batch_topic';
export const TOTAL_CM_HANDLES = 20000;
export const REGISTRATION_BATCH_SIZE = 100;
diff --git a/k6-tests/ncmp/config/endurance.json b/k6-tests/ncmp/config/endurance.json
index d215d0a1e1..d4893a45cc 100644
--- a/k6-tests/ncmp/config/endurance.json
+++ b/k6-tests/ncmp/config/endurance.json
@@ -2,7 +2,8 @@
"hosts": {
"ncmpBaseUrl": "http://localhost:8884",
"dmiStubUrl": "http://ncmp-dmi-plugin-demo-and-csit-stub:8092",
- "kafkaBootstrapServer": "localhost:9093"
+ "kafkaBootstrapServer": "localhost:9093",
+ "containerUpTimeInSeconds": 420
},
"scenarios": {
"passthrough_read_scenario": {
diff --git a/k6-tests/ncmp/config/kpi.json b/k6-tests/ncmp/config/kpi.json
index 2318702449..eed041de85 100644
--- a/k6-tests/ncmp/config/kpi.json
+++ b/k6-tests/ncmp/config/kpi.json
@@ -2,7 +2,8 @@
"hosts": {
"ncmpBaseUrl": "http://localhost:8883",
"dmiStubUrl": "http://ncmp-dmi-plugin-demo-and-csit-stub:8092",
- "kafkaBootstrapServer": "localhost:9092"
+ "kafkaBootstrapServer": "localhost:9092",
+ "containerUpTimeInSeconds": 300
},
"scenarios": {
"passthrough_read_scenario": {
diff --git a/k6-tests/ncmp/ncmp-test-runner.js b/k6-tests/ncmp/ncmp-test-runner.js
index e33ff1852a..9ab326c44c 100644
--- a/k6-tests/ncmp/ncmp-test-runner.js
+++ b/k6-tests/ncmp/ncmp-test-runner.js
@@ -18,14 +18,14 @@
* ============LICENSE_END=========================================================
*/
-import { check } from 'k6';
+import { check, sleep } from 'k6';
import { Trend } from 'k6/metrics';
import { Reader } from 'k6/x/kafka';
import {
TOTAL_CM_HANDLES, READ_DATA_FOR_CM_HANDLE_DELAY_MS, WRITE_DATA_FOR_CM_HANDLE_DELAY_MS,
makeCustomSummaryReport, makeBatchOfCmHandleIds, LEGACY_BATCH_THROUGHPUT_TEST_BATCH_SIZE,
REGISTRATION_BATCH_SIZE, LEGACY_BATCH_THROUGHPUT_TEST_NUMBER_OF_REQUESTS, KAFKA_BOOTSTRAP_SERVERS,
- LEGACY_BATCH_TOPIC_NAME, testConfig
+ LEGACY_BATCH_TOPIC_NAME, CONTAINER_UP_TIME_IN_SECONDS, testConfig
} from './common/utils.js';
import { createCmHandles, deleteCmHandles, waitForAllCmHandlesToBeReady } from './common/cmhandle-crud.js';
import { executeCmHandleSearch, executeCmHandleIdSearch } from './common/search-base.js';
@@ -97,6 +97,8 @@ export function teardown() {
const totalDeregistrationTimeInSeconds = (endTimeInMillis - startTimeInMillis) / 1000.0;
cmHandlesDeletedPerSecondTrend.add(DEREGISTERED_CM_HANDLES / totalDeregistrationTimeInSeconds);
+
+ sleep(CONTAINER_UP_TIME_IN_SECONDS);
}
export function passthroughReadScenario() {