aboutsummaryrefslogtreecommitdiffstats
path: root/k6-tests/ncmp/common
diff options
context:
space:
mode:
Diffstat (limited to 'k6-tests/ncmp/common')
-rw-r--r--k6-tests/ncmp/common/cmhandle-crud.js37
-rw-r--r--k6-tests/ncmp/common/passthrough-crud.js2
-rw-r--r--k6-tests/ncmp/common/search-base.js2
-rw-r--r--k6-tests/ncmp/common/utils.js2
4 files changed, 27 insertions, 16 deletions
diff --git a/k6-tests/ncmp/common/cmhandle-crud.js b/k6-tests/ncmp/common/cmhandle-crud.js
index 285028f13c..3b6c3ff7b7 100644
--- a/k6-tests/ncmp/common/cmhandle-crud.js
+++ b/k6-tests/ncmp/common/cmhandle-crud.js
@@ -51,19 +51,30 @@ export function waitForAllCmHandlesToBeReady() {
function createCmHandlePayload(cmHandleIds) {
return {
"dmiPlugin": DMI_PLUGIN_URL,
- "createdCmHandles": cmHandleIds.map((cmHandleId, index) => ({
- "cmHandle": cmHandleId,
- "alternateId": cmHandleId.replace('ch-', 'Subnetwork=Europe,ManagedElement='),
- "moduleSetTag": MODULE_SET_TAGS[index % MODULE_SET_TAGS.length],
- "cmHandleProperties": {
- "id": "123"
- },
- "publicCmHandleProperties": {
- "Color": "yellow",
- "Size": "small",
- "Shape": "cube"
- }
- })),
+ "createdCmHandles": cmHandleIds.map((cmHandleId, index) => {
+ // Ensure unique networkSegment within range 1-10
+ let networkSegmentId = Math.floor(Math.random() * 10) + 1; // Random between 1-10
+ let moduleTag = MODULE_SET_TAGS[index % MODULE_SET_TAGS.length];
+
+ return {
+ "cmHandle": cmHandleId,
+ "alternateId": cmHandleId.replace('ch-', 'Region=NorthAmerica,Segment='),
+ "moduleSetTag": moduleTag,
+ "cmHandleProperties": {
+ "segmentId": index + 1,
+ "networkSegment": `Region=NorthAmerica,Segment=${networkSegmentId}`, // Unique within range 1-10
+ "deviceIdentifier": `Element=RadioBaseStation_5G_${index + 1000}`, // Unique per cmHandle
+ "hardwareVersion": `HW-${moduleTag}`, // Shares uniqueness with moduleSetTag
+ "softwareVersion": `Firmware_${moduleTag}`, // Shares uniqueness with moduleSetTag
+ "syncStatus": "ACTIVE",
+ "nodeCategory": "VirtualNode"
+ },
+ "publicCmHandleProperties": {
+ "systemId": index + 1,
+ "systemName": "ncmp"
+ }
+ };
+ }),
};
}
diff --git a/k6-tests/ncmp/common/passthrough-crud.js b/k6-tests/ncmp/common/passthrough-crud.js
index a3d48fd590..eed1ab5190 100644
--- a/k6-tests/ncmp/common/passthrough-crud.js
+++ b/k6-tests/ncmp/common/passthrough-crud.js
@@ -67,7 +67,7 @@ export function legacyBatchRead(cmHandleIds) {
}
function getRandomCmHandleReference(useAlternateId) {
- const prefix = useAlternateId ? 'Subnetwork=Europe,ManagedElement=' : 'ch-';
+ const prefix = useAlternateId ? 'Region=NorthAmerica,Segment=' : 'ch-';
return `${prefix}${randomIntBetween(1, TOTAL_CM_HANDLES)}`;
}
diff --git a/k6-tests/ncmp/common/search-base.js b/k6-tests/ncmp/common/search-base.js
index af2caf71ec..af7d153416 100644
--- a/k6-tests/ncmp/common/search-base.js
+++ b/k6-tests/ncmp/common/search-base.js
@@ -51,7 +51,7 @@ const SEARCH_PARAMETERS_PER_SCENARIO = {
"cmHandleQueryParameters": [
{
"conditionName": "hasAllProperties",
- "conditionParameters": [{"Color": "yellow"}]
+ "conditionParameters": [{"systemName": "ncmp"}]
}
]
},
diff --git a/k6-tests/ncmp/common/utils.js b/k6-tests/ncmp/common/utils.js
index ee3e9c7b4b..57ab2ea17f 100644
--- a/k6-tests/ncmp/common/utils.js
+++ b/k6-tests/ncmp/common/utils.js
@@ -27,7 +27,7 @@ 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 = 50000;
-export const REGISTRATION_BATCH_SIZE = 100;
+export const REGISTRATION_BATCH_SIZE = 2000;
export const READ_DATA_FOR_CM_HANDLE_DELAY_MS = 300; // must have same value as in docker-compose.yml
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'};