File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const AWAIT_SLEEP = 3000
10
10
11
11
const BLOCKCHAIN_BODY_REQUEST = JSON . stringify ( { id : 1 , jsonrpc : '2.0' , method : 'eth_chainId' } )
12
12
const EXPECTED_CHAIN_ID = '0x7a69'
13
- const ALLOWED_ERRORS = [ 'ECONNREFUSED' , 'ECONNRESET' , 'UND_ERR_SOCKET' ]
13
+ const ALLOWED_ERRORS = [ 'ECONNREFUSED' , 'ECONNRESET' , 'UND_ERR_SOCKET' , 502 ]
14
14
15
15
function isAllowedError ( e : FetchError ) : boolean {
16
16
if ( e . cause ) {
@@ -22,8 +22,6 @@ function isAllowedError(e: FetchError): boolean {
22
22
return true
23
23
}
24
24
25
- // Errors from Bee-js does not have the `FetchError` structure (eq. `code` property)
26
- // so we assert message itself.
27
25
if ( e . message . includes ( 'socket hang up' ) ) {
28
26
return true
29
27
}
@@ -93,6 +91,8 @@ export async function waitForClient(
93
91
}
94
92
}
95
93
} catch ( error ) {
94
+ console . log ( 'Error:' , error )
95
+
96
96
if ( ! isAllowedError ( error as FetchError ) ) {
97
97
throw error
98
98
}
Original file line number Diff line number Diff line change @@ -12,12 +12,13 @@ import { deleteNetwork, findContainer } from '../utils/docker'
12
12
chaiUse ( chaiAsPromised )
13
13
let testFailed = false
14
14
15
- async function runCommand ( args : string ) : Promise < ReturnType < typeof runCommandRaw > > {
15
+ async function runCommand ( args : string ) : Promise < ReturnType < typeof runCommandRaw > > {
16
16
const result = await runCommandRaw ( args )
17
17
18
18
if ( result . error ) {
19
- console . log ( result . stdout )
20
- console . error ( result . stderr )
19
+ console . log ( '============\n=> ERROR:' , result . error )
20
+ console . log ( '============\n=> STDOUT:' , result . stdout )
21
+ console . error ( '============\n=> STDERR:' , result . stderr )
21
22
}
22
23
23
24
return result
@@ -72,7 +73,9 @@ describe('start command', () => {
72
73
const containers = await docker . listContainers ( )
73
74
for ( const c of containers ) console . log ( ` - ${ c . Names . join ( ', ' ) } ` )
74
75
75
- await runCommand ( 'logs client' )
76
+ const { stdout } = await runCommand ( 'logs client' )
77
+ console . log ( 'Client logs:\n' , stdout )
78
+
76
79
}
77
80
78
81
await runCommand ( 'stop' )
You can’t perform that action at this time.
0 commit comments