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
Catch exceptions raised in parallelize_setup
and ensure tests fail when they occur
#36018
Conversation
In testing this against the example app noted in #35835, the results are exiting properly now (with
Instead of with
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit from me, but otherwise good. I’ll let Eileen take it from here.
@@ -81,6 +83,8 @@ def start | |||
reporter = job[2] | |||
result = Minitest.run_one_method(klass, method) | |||
|
|||
add_setup_exception(result, setup_exception) if setup_exception.present? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don’t think we need present? here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, I don't believe we do. Removed in ccc2ed63c7
Cool, then your commits just need to be squashed. There’s no need for a changelog entry since parallel testing isn’t out yet. |
Resolves rails#35835 If an exception occurs during `parallelize_setup` make sure to catch that exception and apply it to the result of each successive test run. This results in marking all of the tests as failed to bring attention to the issue & ensure it is addressed before proceeding.
ccc2ed6
to
e460c77
Compare
Just squashed the commits.
👍 |
Summary
The changes here ensure that we catch any
StandardException
s that occur during theafter_fork
call (blocks passed intoparallelize_setup
) and record those exceptions with the test results. This is work towards resolving #35835.This results in marking all of the tests as failed to bring attention to the issue & ensure it is addressed before proceeding.
/cc #35835
/cc @eileencodes