From fe8d9e7a9cfa4db4474bfb8c81263f8977b4b40f Mon Sep 17 00:00:00 2001 From: Bartosz Prusinowski Date: Fri, 16 Feb 2024 09:39:45 +0100 Subject: [PATCH] test: Do not fail tests that exceed threshold --- k6/performance-tests/graphql/DataCubeComponents.js | 9 ++++++--- k6/performance-tests/graphql/DataCubeMetadata.js | 9 ++++++--- k6/performance-tests/graphql/DataCubeObservations.js | 9 ++++++--- k6/performance-tests/graphql/DataCubePreview.js | 7 ++++--- k6/performance-tests/graphql/PossibleFilters.js | 7 ++++--- 5 files changed, 26 insertions(+), 15 deletions(-) diff --git a/k6/performance-tests/graphql/DataCubeComponents.js b/k6/performance-tests/graphql/DataCubeComponents.js index a7ff7a69b5..b26ae9efc5 100644 --- a/k6/performance-tests/graphql/DataCubeComponents.js +++ b/k6/performance-tests/graphql/DataCubeComponents.js @@ -38,9 +38,12 @@ const variables = { export const options = { iterations: 2, thresholds: { - http_req_duration: [ - `avg<${2 * metadata.queries.DataCubeComponents.expectedDuration}`, - ], + http_req_duration: { + threshold: `avg<${ + 2 * metadata.queries.DataCubeComponents.expectedDuration + }`, + abortOnFail: false, + }, }, }; diff --git a/k6/performance-tests/graphql/DataCubeMetadata.js b/k6/performance-tests/graphql/DataCubeMetadata.js index ddeb17534c..d65a44c534 100644 --- a/k6/performance-tests/graphql/DataCubeMetadata.js +++ b/k6/performance-tests/graphql/DataCubeMetadata.js @@ -38,9 +38,12 @@ const variables = { export const options = { iterations: 2, thresholds: { - http_req_duration: [ - `avg<${2 * metadata.queries.DataCubeMetadata.expectedDuration}`, - ], + http_req_duration: { + threshold: `avg<${ + 2 * metadata.queries.DataCubeMetadata.expectedDuration + }`, + abortOnFail: false, + }, }, }; diff --git a/k6/performance-tests/graphql/DataCubeObservations.js b/k6/performance-tests/graphql/DataCubeObservations.js index e76726568f..b78c22207e 100644 --- a/k6/performance-tests/graphql/DataCubeObservations.js +++ b/k6/performance-tests/graphql/DataCubeObservations.js @@ -39,9 +39,12 @@ const variables = { export const options = { iterations: 2, thresholds: { - http_req_duration: [ - `avg<${2 * metadata.queries.DataCubeObservations.expectedDuration}`, - ], + http_req_duration: { + threshold: `avg<${ + 2 * metadata.queries.DataCubeObservations.expectedDuration + }`, + abortOnFail: false, + }, }, }; diff --git a/k6/performance-tests/graphql/DataCubePreview.js b/k6/performance-tests/graphql/DataCubePreview.js index 396fefe871..e209da7159 100644 --- a/k6/performance-tests/graphql/DataCubePreview.js +++ b/k6/performance-tests/graphql/DataCubePreview.js @@ -39,9 +39,10 @@ const variables = { export const options = { iterations: 2, thresholds: { - http_req_duration: [ - `avg<${2 * metadata.queries.DataCubePreview.expectedDuration}`, - ], + http_req_duration: { + threshold: `avg<${2 * metadata.queries.DataCubePreview.expectedDuration}`, + abortOnFail: false, + }, }, }; diff --git a/k6/performance-tests/graphql/PossibleFilters.js b/k6/performance-tests/graphql/PossibleFilters.js index 58bc5241a8..c32bd714c7 100644 --- a/k6/performance-tests/graphql/PossibleFilters.js +++ b/k6/performance-tests/graphql/PossibleFilters.js @@ -41,9 +41,10 @@ const variables = { export const options = { iterations: 2, thresholds: { - http_req_duration: [ - `avg<${2 * metadata.queries.PossibleFilters.expectedDuration}`, - ], + http_req_duration: { + threshold: `avg<${2 * metadata.queries.PossibleFilters.expectedDuration}`, + abortOnFail: false, + }, }, };