File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ export async function loadtest(opts: LoadtestOptions) {
8585 }
8686 } ) ( ) ;
8787
88- await waitForExit ;
88+ await Promise . race ( [ waitForExit , server . waitForExit ] ) ;
8989
9090 return { memoryInMBSnapshots } ;
9191}
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { fetch } from '@whatwg-node/fetch';
99import terminate from 'terminate/promise' ;
1010
1111export interface Proc extends AsyncDisposable {
12+ waitForExit : Promise < void > ;
1213 getStd ( o : 'out' | 'err' | 'both' ) : string ;
1314 getStats ( ) : Promise < {
1415 // Total CPU utilization (of all cores) as a percentage.
@@ -84,6 +85,7 @@ export function spawn(
8485 let stderr = '' ;
8586 let stdboth = '' ;
8687 const proc : Proc = {
88+ waitForExit,
8789 getStd ( o ) {
8890 switch ( o ) {
8991 case 'out' :
You can’t perform that action at this time.
0 commit comments