Skip to content

Commit 3e01468

Browse files
committed
testkit-backend: add support to CheckMultiDBSupport
1 parent 7782727 commit 3e01468

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

testkit-backend/src/request-handlers.js

+19
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,15 @@ export function StartTest (_, { testName }, wire) {
223223
const reason =
224224
'Driver is failing trying to update the original routing server'
225225
wire.writeResponse('SkipTest', { reason })
226+
} else if (
227+
testName.endsWith(
228+
'test_should_successfully_check_if_support_for_multi_db_is_available'
229+
)
230+
) {
231+
console.warn(`>>> Skipping test ${testName}`)
232+
const reason =
233+
'Driver is creating a dedicated connection to check the MultiDBSupport'
234+
wire.writeResponse('SkipTest', { reason })
226235
} else {
227236
console.log(`>>> Starting test ${testName}`)
228237
wire.writeResponse('RunTest', null)
@@ -236,3 +245,13 @@ export function VerifyConnectivity (context, { driverId }, wire) {
236245
.then(() => wire.writeResponse('Driver', { id: driverId }))
237246
.catch(error => wire.writeError(error))
238247
}
248+
249+
export function CheckMultiDBSupport (context, { driverId }, wire) {
250+
const driver = context.getDriver(driverId)
251+
driver
252+
.supportsMultiDb()
253+
.then(available =>
254+
wire.writeResponse('MultiDBSupport', { id: driverId, available })
255+
)
256+
.catch(error => wire.writeError(error))
257+
}

0 commit comments

Comments
 (0)