File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,16 @@ describe.concurrent('test socket', () => {
2323 if ( Conf . baseConfig . host !== 'localhost' && Conf . baseConfig . host !== 'mariadb.example.com' ) return skip ( ) ;
2424
2525 const res = await shareConn . query ( 'select @@version_compile_os,@@socket soc, @@named_pipe pipeEnable' ) ;
26- if ( res [ 0 ] . pipeEnable === 0 ) {
26+ if ( ! res [ 0 ] . pipeEnable || Number ( res [ 0 ] . pipeEnable ) === 0 ) {
2727 return skip ( ) ;
2828 }
29- const conn = await createConnection ( { socketPath : '\\\\.\\pipe\\' + res [ 0 ] . soc } ) ;
29+ let conn ;
30+ try {
31+ conn = await createConnection ( { socketPath : '\\\\.\\pipe\\' + res [ 0 ] . soc } ) ;
32+ } catch ( err ) {
33+ if ( err . code === 'ENOENT' ) return skip ( ) ;
34+ throw err ;
35+ }
3036 await conn . connect ( ) ;
3137 await conn . query ( 'DO 1' ) ;
3238 await conn . end ( ) ;
You can’t perform that action at this time.
0 commit comments