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

Fix Runner Hang Problem #2090

Merged
merged 1 commit into from
Jan 13, 2022

Conversation

cheeseng
Copy link
Contributor

@cheeseng cheeseng commented Jan 8, 2022

Fire RunAborted event when error in creating dispatch reporter, fixing hang problem when it happens.

This should fix the following issue:

#2069 (comment)

@@ -1489,8 +1489,17 @@ object Runner {
// getDispatchReporter may complete abruptly with an exception, if there is an problem trying to load
// or instantiate a custom reporter class.
case ex: Throwable => {
System.err.println(Resources.bigProblemsMaybeCustomReporter)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is an improvement, for sure, but this is another catch of Throwable. Should we be using NonFatal here also?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bvenners The Throwable was there before this PR, I think we did want to catch everything, as here we're going to fire RunAborted event to stop the run properly, if it is a fatal exception (like out of memory) that can cause the following code to not able to execute, I think it will be blowing up again here.

@bvenners bvenners merged commit 5153b88 into scalatest:3.2.x-new Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants