From 5b05b58e2801b9163bff48254c5a6bf8a59cec07 Mon Sep 17 00:00:00 2001 From: Kummithi Guru Eswar Sainath Reddy Date: Sun, 25 Aug 2024 14:51:11 +0530 Subject: [PATCH 1/3] Changes suite communication default mode to transport --- src/pubsub/handlers/RunTestHandler.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pubsub/handlers/RunTestHandler.js b/src/pubsub/handlers/RunTestHandler.js index ad834fb5..19958478 100644 --- a/src/pubsub/handlers/RunTestHandler.js +++ b/src/pubsub/handlers/RunTestHandler.js @@ -71,7 +71,7 @@ export default class RunTestHandler extends BaseHandler { async getValidationReport(message) { const sdkMode = message.action; - process.env.COMMUNICATION_MODE = message.context.communicationMode; + process.env.COMMUNICATION_MODE = message.context.communicationMode ? message.context.communicationMode : CONSTANTS.TRANSPORT; const sdkInvokerInfo = new Test_Runner(); let validatedMenu; From 95fb1b56d9d028485259628918593cd15da19a35 Mon Sep 17 00:00:00 2001 From: Kummithi Guru Eswar Sainath Reddy Date: Mon, 26 Aug 2024 14:17:03 +0530 Subject: [PATCH 2/3] Corrected the context for undefined response --- src/Test_Runner.js | 18 +++++++++++++----- src/constant.js | 1 + 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/Test_Runner.js b/src/Test_Runner.js index 812ff2d9..9c1c6bd1 100644 --- a/src/Test_Runner.js +++ b/src/Test_Runner.js @@ -849,11 +849,19 @@ export class Test_Runner { } const doesErrorMsgContainMethodNotFound = typeof errorMessageLog == 'string' && CONSTANTS.ERROR_LIST.find((i) => i.toLowerCase().includes(errorMessageLog.toLowerCase())); - testContext = { - params: params, - result: null, - error: result.error, - }; + if (result.error && result.error.message && CONSTANTS.ERROR_RESPONSE_MESSAGE.includes(result.error.message)) { + testContext = { + params: params, + result: null, + error: null, + }; + } else { + testContext = { + params: params, + result: null, + error: result.error, + }; + } if (result.error.responseError) { testContext.result = result.error.responseError; testContext.error = null; diff --git a/src/constant.js b/src/constant.js index 0d98cab4..618c05b1 100644 --- a/src/constant.js +++ b/src/constant.js @@ -174,4 +174,5 @@ export const CONSTANTS = { VERSIONS: 'Versions', ERROR_SCHEMA_TRANSPORT: 'errorSchemaTransport', ERROR_SCHEMA_SDK: 'errorSchemaSDK', + ERROR_RESPONSE_MESSAGE: ['Timed out in 10000 ms.', 'Received response as undefined'], }; From 7feff1dd9a6482e86c43324d60268b682b4d8f88 Mon Sep 17 00:00:00 2001 From: Kummithi Guru Eswar Sainath Reddy Date: Tue, 27 Aug 2024 11:29:50 +0530 Subject: [PATCH 3/3] Reverted testcontext changes --- src/Test_Runner.js | 18 +++++------------- src/constant.js | 1 - 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/src/Test_Runner.js b/src/Test_Runner.js index 9c1c6bd1..812ff2d9 100644 --- a/src/Test_Runner.js +++ b/src/Test_Runner.js @@ -849,19 +849,11 @@ export class Test_Runner { } const doesErrorMsgContainMethodNotFound = typeof errorMessageLog == 'string' && CONSTANTS.ERROR_LIST.find((i) => i.toLowerCase().includes(errorMessageLog.toLowerCase())); - if (result.error && result.error.message && CONSTANTS.ERROR_RESPONSE_MESSAGE.includes(result.error.message)) { - testContext = { - params: params, - result: null, - error: null, - }; - } else { - testContext = { - params: params, - result: null, - error: result.error, - }; - } + testContext = { + params: params, + result: null, + error: result.error, + }; if (result.error.responseError) { testContext.result = result.error.responseError; testContext.error = null; diff --git a/src/constant.js b/src/constant.js index 618c05b1..0d98cab4 100644 --- a/src/constant.js +++ b/src/constant.js @@ -174,5 +174,4 @@ export const CONSTANTS = { VERSIONS: 'Versions', ERROR_SCHEMA_TRANSPORT: 'errorSchemaTransport', ERROR_SCHEMA_SDK: 'errorSchemaSDK', - ERROR_RESPONSE_MESSAGE: ['Timed out in 10000 ms.', 'Received response as undefined'], };