Skip to content

Commit

Permalink
Delete all networks on error
Browse files Browse the repository at this point in the history
  • Loading branch information
serban300 committed May 1, 2023
1 parent fdb6f85 commit f1d6962
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions javascript/packages/orchestrator/src/orchestrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,8 @@ export async function start(
await network.dumpLogs();
await network.stop();
}
if (cronInterval) clearInterval(cronInterval);
process.exit(1);
clearInterval(cronInterval);
throw error;
}
}

Expand Down
3 changes: 3 additions & 0 deletions javascript/packages/orchestrator/src/test-runner/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ export async function run(
"Error launching the network!",
)} \t ${decorators.bright(err)}`,
);
for (const network of networks) {
await network.stop();
}
exitMocha(100);
}
}
Expand Down

0 comments on commit f1d6962

Please sign in to comment.