File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
dev-packages/node-overhead-gh-action/lib Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -23,13 +23,13 @@ async function getMeasurements(instrumentFile) {
2323 log ( 'Example app listening, running autocannon...' ) ;
2424
2525 try {
26- return await startAutocannonProcess ( ) ;
26+ const result = await startAutocannonProcess ( ) ;
27+ await killAppProcess ( ) ;
28+ return result ;
2729 } catch ( error ) {
2830 log ( `Error running autocannon: ${ error } ` ) ;
29- } finally {
30- log ( 'Killing app process...' ) ;
3131 await killAppProcess ( ) ;
32- log ( 'App process killed' ) ;
32+ throw error ;
3333 }
3434}
3535
@@ -69,8 +69,10 @@ async function startAppProcess(cmd) {
6969 } ) ;
7070
7171 return async ( ) => {
72+ log ( 'Killing app process...' ) ;
7273 appProcess . kill ( 'SIGKILL' ) ;
7374 await appClosePromise ;
75+ log ( 'App process killed' ) ;
7476 } ;
7577}
7678
You can’t perform that action at this time.
0 commit comments