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 StackTrace printing when multiple exceptions occur (#1238) #1359

Merged
merged 1 commit into from
Sep 17, 2016
Merged

Fix StackTrace printing when multiple exceptions occur (#1238) #1359

merged 1 commit into from
Sep 17, 2016

Conversation

jacobrh91
Copy link
Contributor

@jacobrh91 jacobrh91 commented Sep 14, 2016

I fixed the way MultipleFailureException prints the stacktraces. Now, when multiple exceptions are found, the stacktrace for each exception is printed

@marcphilipp
Copy link
Member

Who calls printStackTrace directly and why?

@kcooney
Copy link
Member

kcooney commented Sep 14, 2016

@marcphilipp apparently, we do: https://github.com/junit-team/junit4/search?utf8=%E2%9C%93&q=printStackTrace

The only call I see that could take in a MultipleFailureException is in Throwables which is used in a few places: https://github.com/junit-team/junit4/search?utf8=%E2%9C%93&q=Throwables.getStackTrace (so this pull would affect the output of org.junit.internal.TextListener which is used by JUnitCore.runMain())

@marcphilipp
Copy link
Member

Thanks for the pointer!

@kcooney Do you foresee this causing any issues?

@kcooney
Copy link
Member

kcooney commented Sep 16, 2016

@marcphilipp if users store these logs, then the log files could obviously get longer. The output might be hard to read, but if there are multiple failures then we should print something about each of them.

We might want to revisit trimming the stack traces in the future. Each of these traces would likely contain duplicate frames that include the guts of JUnit

@marcphilipp
Copy link
Member

I am in favor of merging this change.

@junit-team/junit-committers What do you guys think?

Copy link
Contributor

@stefanbirkner stefanbirkner left a comment

Choose a reason for hiding this comment

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

LGTM

@kcooney kcooney merged commit 35c8fd3 into junit-team:master Sep 17, 2016
@kcooney
Copy link
Member

kcooney commented Sep 17, 2016

@jacobrh91 could you please update the release notes?

sebasjm pushed a commit to sebasjm/junit4 that referenced this pull request Mar 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants