From da252fc834e16631fd9a3164471ab37545965a4d Mon Sep 17 00:00:00 2001 From: Antonio Barcelos Date: Wed, 31 Mar 2021 14:22:20 +0200 Subject: [PATCH] testkit-backend: Implement VerifyConnectivity message and skip broken tests scenarios --- testkit-backend/src/request-handlers.js | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/testkit-backend/src/request-handlers.js b/testkit-backend/src/request-handlers.js index 8bfc5d232..c25f8a37e 100644 --- a/testkit-backend/src/request-handlers.js +++ b/testkit-backend/src/request-handlers.js @@ -214,6 +214,25 @@ export function SessionWriteTransaction (context, data, wire) { } export function StartTest (_, { testName }, wire) { - console.log(`>>> Starting test ${testName}`) - wire.writeResponse('RunTest', null) + if ( + testName.endsWith( + 'test_should_use_initial_router_for_discovery_when_others_unavailable' + ) + ) { + console.warn(`>>> Skipping test ${testName}`) + const reason = + 'Driver is failing trying to update the original routing server' + wire.writeResponse('SkipTest', { reason }) + } else { + console.log(`>>> Starting test ${testName}`) + wire.writeResponse('RunTest', null) + } +} + +export function VerifyConnectivity (context, { driverId }, wire) { + const driver = context.getDriver(driverId) + driver + .verifyConnectivity() + .then(() => wire.writeResponse('Driver', { id: driverId })) + .catch(error => wire.writeError(error)) }