From 4dac130c35ef7e720862722895eeb01ae293a042 Mon Sep 17 00:00:00 2001 From: danielhanrahan Date: Fri, 30 Aug 2024 15:03:06 +0100 Subject: [PATCH] [k6] Fix k6 tests after DMI stub changes A change to DMI stub has broken k6 module search due to module rename and increased registration time. - increase setupTimeout by 2 minutes to factor in DMI startup delay - module search uses module common to all module set tags - only record times for searches returning number of CM-handles Issue-ID: CPS-2353 Signed-off-by: danielhanrahan Change-Id: I9067dc73015cfb475cdce1e7a3cc2d5401449caf --- k6-tests/ncmp/common/search-base.js | 2 +- k6-tests/ncmp/ncmp-kpi.js | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/k6-tests/ncmp/common/search-base.js b/k6-tests/ncmp/common/search-base.js index bc964856af..a7d0c925c4 100644 --- a/k6-tests/ncmp/common/search-base.js +++ b/k6-tests/ncmp/common/search-base.js @@ -26,7 +26,7 @@ const SEARCH_PARAMETERS_PER_SCENARIO = { 'cmHandleQueryParameters': [ { 'conditionName': 'hasAllModules', - 'conditionParameters': [{'moduleName': 'ietf-yang-types-1'}] + 'conditionParameters': [{'moduleName': 'ietf-yang-types'}] } ] }, diff --git a/k6-tests/ncmp/ncmp-kpi.js b/k6-tests/ncmp/ncmp-kpi.js index 769b4b2ce1..16c6f7d2b1 100644 --- a/k6-tests/ncmp/ncmp-kpi.js +++ b/k6-tests/ncmp/ncmp-kpi.js @@ -51,7 +51,7 @@ const reader = new Reader({ const DURATION = '15m'; export const options = { - setupTimeout: '6m', + setupTimeout: '8m', teardownTimeout: '6m', scenarios: { passthrough_read: { @@ -181,16 +181,16 @@ export function passthrough_write() { export function id_search_module() { const response = executeCmHandleIdSearch('module'); - if (check(response, { 'CM handle ID search status equals 200': (r) => r.status === 200 })) { - check(response, { 'CM handle ID search returned expected CM-handles': (r) => r.json('#') === TOTAL_CM_HANDLES }); + if (check(response, { 'CM handle ID search status equals 200': (r) => r.status === 200 }) + && check(response, { 'CM handle ID search returned expected CM-handles': (r) => r.json('#') === TOTAL_CM_HANDLES })) { idSearchDurationTrend.add(response.timings.duration); } } export function cm_search_module() { const response = executeCmHandleSearch('module'); - if (check(response, { 'CM handle search status equals 200': (r) => r.status === 200 })) { - check(response, { 'CM handle search returned expected CM-handles': (r) => r.json('#') === TOTAL_CM_HANDLES }); + if (check(response, { 'CM handle search status equals 200': (r) => r.status === 200 }) + && check(response, { 'CM handle search returned expected CM-handles': (r) => r.json('#') === TOTAL_CM_HANDLES })) { cmSearchDurationTrend.add(response.timings.duration); } } -- 2.16.6