Skip to content

Commit

Permalink
chore: Handle errors in e2e teardown to fix e2e token (#10590)
Browse files Browse the repository at this point in the history
`e2e-token` test was failing due to a telemetry shutdown from one of the
test suites affecting another. Try/catching the environment teardown
seems to patch the issue.
  • Loading branch information
spalladino authored Dec 11, 2024
1 parent 804839c commit 5d4cdc1
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions yarn-project/end-to-end/src/fixtures/snapshot_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { MNEMONIC } from './fixtures.js';
import { getACVMConfig } from './get_acvm_config.js';
import { getBBConfig } from './get_bb_config.js';
import { setupL1Contracts } from './setup_l1_contracts.js';
import { type SetupOptions, createAndSyncProverNode, getPrivateKeyFromIndex } from './utils.js';
import { type SetupOptions, createAndSyncProverNode, getLogger, getPrivateKeyFromIndex } from './utils.js';
import { getEndToEndTestTelemetryClient } from './with_telemetry_utils.js';

export type SubsystemsContext = {
Expand Down Expand Up @@ -243,13 +243,18 @@ async function teardown(context: SubsystemsContext | undefined) {
if (!context) {
return;
}
await context.proverNode?.stop();
await context.aztecNode.stop();
await context.pxe.stop();
await context.acvmConfig?.cleanup();
await context.anvil.stop();
await context.watcher.stop();
context.timer?.uninstall();
try {
getLogger().info('Tearing down subsystems');
await context.proverNode?.stop();
await context.aztecNode.stop();
await context.pxe.stop();
await context.acvmConfig?.cleanup();
await context.anvil.stop();
await context.watcher.stop();
context.timer?.uninstall();
} catch (err) {
getLogger().error('Error during teardown', err);
}
}

/**
Expand Down

0 comments on commit 5d4cdc1

Please sign in to comment.