From 37962e3faca4f2306546c4f70d480b0c323d2c68 Mon Sep 17 00:00:00 2001 From: danielhanrahan Date: Wed, 13 Nov 2024 18:07:48 +0000 Subject: [k6] Lower load for legacy async batch operation test Legacy async batch operation test is failing and reporting zero as result due to timeouts in the test. - Lower total batch requests to 100 instead of 1000 - Limit the number of kafka messages per batch to 200 instead of 1000 to avoid timeout issues. Issue-ID: CPS-2274 Signed-off-by: danielhanrahan Change-Id: I06c04173ca1ed0f3580df6a73b5d647ab7ed0c71 --- k6-tests/ncmp/common/utils.js | 2 +- k6-tests/ncmp/ncmp-kpi.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'k6-tests') diff --git a/k6-tests/ncmp/common/utils.js b/k6-tests/ncmp/common/utils.js index 6ddcca5fbf..a2467edf6f 100644 --- a/k6-tests/ncmp/common/utils.js +++ b/k6-tests/ncmp/common/utils.js @@ -27,7 +27,7 @@ export const READ_DATA_FOR_CM_HANDLE_DELAY_MS = 300; // must have same value as export const WRITE_DATA_FOR_CM_HANDLE_DELAY_MS = 670; // must have same value as in docker-compose.yml export const CONTENT_TYPE_JSON_PARAM = {'Content-Type': 'application/json'}; export const LEGACY_BATCH_THROUGHPUT_TEST_BATCH_SIZE = 200; -export const LEGACY_BATCH_THROUGHPUT_TEST_NUMBER_OF_REQUESTS = 1000; +export const LEGACY_BATCH_THROUGHPUT_TEST_NUMBER_OF_REQUESTS = 100; export const LEGACY_BATCH_TOPIC_NAME = 'legacy_batch_topic'; export const KAFKA_BOOTSTRAP_SERVERS = ['localhost:9092']; export const MODULE_SET_TAGS = ['tagA', 'tagB', 'tagC', 'tagD', 'tagE']; diff --git a/k6-tests/ncmp/ncmp-kpi.js b/k6-tests/ncmp/ncmp-kpi.js index 53f7629cac..e46c547c30 100644 --- a/k6-tests/ncmp/ncmp-kpi.js +++ b/k6-tests/ncmp/ncmp-kpi.js @@ -345,8 +345,7 @@ export function legacyBatchConsumeScenario() { let startTime = Date.now(); while (messagesConsumed < TOTAL_MESSAGES_TO_CONSUME) { - let messages = legacyBatchEventReader.consume({ limit: 1000 }); - + let messages = legacyBatchEventReader.consume({ limit: LEGACY_BATCH_THROUGHPUT_TEST_BATCH_SIZE }); if (messages.length > 0) { messagesConsumed += messages.length; } -- cgit 1.2.3-korg