Skip to content

Commit

Permalink
Fix: Teardown process to exit relayer without error
Browse files Browse the repository at this point in the history
  • Loading branch information
ajimeno04 committed Aug 15, 2024
1 parent 5207538 commit c868a7e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/config/jest.teardown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,13 @@ export default async function globalTeardown() {
}
}

// Attempt to gracefully stop the relayer process
// This could be replaced with a more targeted process stopping mechanism
try {
await execPromise(`pkill -f relayer-process-name`); // Use a specific name if possible
await execPromise(`pkill -f pkill anvil`);
console.log('Relayer process stopped.');
} catch (error) {
console.error('Failed to stop relayer process:', error);
}

// Clean up files, but don't fail the teardown if the files are already deleted
try {
await fs.unlink('./tests/config/pids.json');
console.log('Deleted pids.json');
Expand Down

0 comments on commit c868a7e

Please sign in to comment.