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

Worker crash in-between running testitems should error gracefully #118

Open
nickrobinson251 opened this issue Nov 9, 2023 · 0 comments
Open
Labels
new feature A feature we would like to add

Comments

@nickrobinson251
Copy link
Collaborator

nickrobinson251 commented Nov 9, 2023

A worker crashing in between running testitems currently:

  • causes an exception to be thrown, preventing outputting the test report
  • the worker’s failure won't be logged until the end because of the (@sync/@spawn pattern here).

In theory, nothing should be running on the worker between test-items, but that relies on intended usage. It is possible for a testitem to start a background task (e.g. start a server) and forget to shut it down at the end of the testitem, and for that task to then (accidentally) bork the worker in-between test-items. And in this case the error should make clear what happened.

Proposed improvements:

  • A test failure in between tests should be caught, and reported at the end
    • We should also restart the worker in this case
  • We should still print the standard test failures & successes report
  • We should still throw an exception

Proposed output format:

An error caused Worker 23423 to crash in between tests. More details after the test report, below.
Test Summary:                                      | Pass  Error  Total      Time
RAICode                                            |    ...
   ...

EXCEPTION CAUGHT WHEN SENDING TESTITEM TO WORKER:
Worker 23423 crashed when attempting to send testitem "..."
Previous 10 tests run on this worker:
- ...
- ...

<throw the exception>
Stacktrace:
...
@nickrobinson251 nickrobinson251 added the new feature A feature we would like to add label Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A feature we would like to add
Projects
None yet
Development

No branches or pull requests

1 participant