1
1
import neo4j from 'neo4j'
2
2
import ResultObserver from './result-observer.js'
3
3
import { cypherToNative , nativeToCypher } from './cypher-native-binders.js'
4
+ import { shouldRunTest } from './skipped-tests'
4
5
5
6
export function NewDriver ( context , data , { writeResponse } ) {
6
7
const {
@@ -16,7 +17,11 @@ export function NewDriver (context, data, { writeResponse }) {
16
17
writeResponse ( 'ResolverResolutionRequired' , { id, address } )
17
18
} )
18
19
: 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
+ } )
20
25
const id = context . addDriver ( driver )
21
26
writeResponse ( 'Driver' , { id } )
22
27
}
@@ -222,28 +227,10 @@ export function SessionWriteTransaction (context, data, wire) {
222
227
}
223
228
224
229
export 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
+ } )
247
234
}
248
235
249
236
export function VerifyConnectivity ( context , { driverId } , wire ) {
0 commit comments