@@ -104,15 +104,15 @@ module.exports = {
104
104
let tempdir = tmp . dirSync ( { prefix : 'graph-test' , unsafeCleanup : true } ) . name
105
105
try {
106
106
await configureTestEnvironment ( toolbox , tempdir , composeFile , nodeImage )
107
- } catch ( e ) {
107
+ } catch ( e ) {
108
108
process . exitCode = 1
109
109
return
110
110
}
111
111
112
112
// Bring up test environment
113
113
try {
114
114
await startTestEnvironment ( tempdir )
115
- } catch ( e ) {
115
+ } catch ( e ) {
116
116
print . error ( `${ e } ` )
117
117
process . exitCode = 1
118
118
return
@@ -125,7 +125,7 @@ module.exports = {
125
125
skipWaitForIpfs,
126
126
skipWaitForPostgres,
127
127
} )
128
- } catch ( e ) {
128
+ } catch ( e ) {
129
129
await stopTestEnvironment ( tempdir )
130
130
process . exitCode = 1
131
131
return
@@ -141,7 +141,7 @@ module.exports = {
141
141
standaloneNodeArgs ,
142
142
nodeOutputChunks ,
143
143
)
144
- } catch ( e ) {
144
+ } catch ( e ) {
145
145
toolbox . print . error ( '' )
146
146
toolbox . print . error ( ' Graph Node' )
147
147
toolbox . print . error ( ' ----------' )
@@ -158,7 +158,7 @@ module.exports = {
158
158
// Wait for Graph Node to come up
159
159
try {
160
160
await waitForGraphNode ( )
161
- } catch ( e ) {
161
+ } catch ( e ) {
162
162
toolbox . print . error ( '' )
163
163
toolbox . print . error ( ' Graph Node' )
164
164
toolbox . print . error ( ' ----------' )
@@ -181,7 +181,7 @@ module.exports = {
181
181
if ( nodeProcess ) {
182
182
try {
183
183
await stopGraphNode ( nodeProcess )
184
- } catch ( e ) {
184
+ } catch ( e ) {
185
185
// do nothing (the spinner already logs the problem)
186
186
}
187
187
}
@@ -202,7 +202,7 @@ module.exports = {
202
202
// Bring down the test environment
203
203
try {
204
204
await stopTestEnvironment ( tempdir )
205
- } catch ( e ) {
205
+ } catch ( e ) {
206
206
// do nothing (the spinner already logs the problem)
207
207
}
208
208
@@ -383,6 +383,9 @@ const stopTestEnvironment = async tempdir =>
383
383
`Failed to stop test environment` ,
384
384
`Warnings stopping test environment` ,
385
385
async spinner => {
386
+ // Our containers do not respond quickly to the SIGTERM which `down` tries before timing out
387
+ // and killing them, so speed things up by sending a SIGKILL right away.
388
+ await compose . kill ( { cwd : path . join ( tempdir , 'compose' ) } )
386
389
await compose . down ( { cwd : path . join ( tempdir , 'compose' ) } )
387
390
} ,
388
391
)
0 commit comments