[k6] Lower load for legacy async batch operation test 00/139400/2
authordanielhanrahan <daniel.hanrahan@est.tech>
Wed, 13 Nov 2024 18:07:48 +0000 (18:07 +0000)
committerPriyank Maheshwari <priyank.maheshwari@est.tech>
Fri, 15 Nov 2024 17:03:13 +0000 (17:03 +0000)
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 <daniel.hanrahan@est.tech>
Change-Id: I06c04173ca1ed0f3580df6a73b5d647ab7ed0c71

k6-tests/ncmp/common/utils.js
k6-tests/ncmp/ncmp-kpi.js

index 6ddcca5..a2467ed 100644 (file)
@@ -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'];
index 53f7629..e46c547 100644 (file)
@@ -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;
             }