11import neo4j from 'neo4j'
22import ResultObserver from './result-observer.js'
33import { cypherToNative , nativeToCypher } from './cypher-native-binders.js'
4+ import { shouldRunTest } from './skipped-tests'
45
56export function NewDriver ( context , data , { writeResponse } ) {
67 const {
@@ -16,7 +17,11 @@ export function NewDriver (context, data, { writeResponse }) {
1617 writeResponse ( 'ResolverResolutionRequired' , { id, address } )
1718 } )
1819 : undefined
19- const driver = neo4j . driver ( uri , authToken , { userAgent, resolver, useBigInt : true } )
20+ const driver = neo4j . driver ( uri , authToken , {
21+ userAgent,
22+ resolver,
23+ useBigInt : true
24+ } )
2025 const id = context . addDriver ( driver )
2126 writeResponse ( 'Driver' , { id } )
2227}
@@ -222,28 +227,10 @@ export function SessionWriteTransaction (context, data, wire) {
222227}
223228
224229export function StartTest ( _ , { testName } , wire ) {
225- if (
226- testName . endsWith (
227- 'test_should_use_initial_router_for_discovery_when_others_unavailable'
228- )
229- ) {
230- console . warn ( `>>> Skipping test ${ testName } ` )
231- const reason =
232- 'Driver is failing trying to update the original routing server'
233- wire . writeResponse ( 'SkipTest' , { reason } )
234- } else if (
235- testName . endsWith (
236- 'test_should_successfully_check_if_support_for_multi_db_is_available'
237- )
238- ) {
239- console . warn ( `>>> Skipping test ${ testName } ` )
240- const reason =
241- 'Driver is creating a dedicated connection to check the MultiDBSupport'
242- wire . writeResponse ( 'SkipTest' , { reason } )
243- } else {
244- console . log ( `>>> Starting test ${ testName } ` )
245- wire . writeResponse ( 'RunTest' , null )
246- }
230+ shouldRunTest ( testName , {
231+ onRun : ( ) => wire . writeResponse ( 'RunTest' , null ) ,
232+ onSkip : reason => wire . writeResponse ( 'SkipTest' , { reason } )
233+ } )
247234}
248235
249236export function VerifyConnectivity ( context , { driverId } , wire ) {
0 commit comments