Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add catch for dumpLogs and stop network in teardown #1878

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions javascript/packages/orchestrator/src/test-runner/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,14 @@ export async function run(
debug(`\t 🕰 [Test] elapsed time: ${elapsedSecs} secs`);
if (inCI) await registerTotalElapsedTimeSecs(elapsedSecs);

const logsPath = await network.dumpLogs(false);
let logsPath;
try {
logsPath = await network.dumpLogs(false);
} catch (e) {
console.log(`${decorators.red("❌ Error dumping logs!")}`);
console.log(`err: ${e}`);
}

const tests = this.test?.parent?.tests;

if (tests) {
Expand All @@ -154,7 +161,12 @@ export async function run(

// All test passed, just remove the network
console.log(`\n\t ${decorators.green("Deleting network")}`);
await network.stop();
try {
await network.stop();
} catch (e) {
console.log(`${decorators.yellow("⚠️ Error deleting network")}`);
console.log(`err: ${e}`);
}

// show logs
console.log(
Expand Down
Loading