-
Notifications
You must be signed in to change notification settings - Fork 79
Description
If the payjoin CLI or an end-to-end test panics, the test resources remain uncleared. Since env::temp_dir() might return the same temporary directory for subsequent test runs. Each test run is expected to start with a fresh slate, which is particularly important if the developer is modifying the data serialization format between tests.
A quick fix is to prefix the temporary directory with a timestamp to ensure uniqueness. A more comprehensive solution would be to implement a panic handler along with handlers for other signals (e.g., SIG_INT, SIG_KILL) that the test process might receive. Alternatively we could optimistically clean the temp dirs before we run the tests but to quote @DanGould "that smells". So I would advocate for the panic handler solution.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status