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

Make TestExecutionSummary.Failure serializable #2082

Merged

Conversation

loicmathieu
Copy link
Contributor

@loicmathieu loicmathieu commented Oct 24, 2019

Overview

Make the TestExecutionSummary.Failure interface serializable.

The Throwable and TestIdentifier classes that are used by this interface are serializable, so it is safe to make it serializable also.

The default implementation org.junit.platform.launcher.listeners.MutableTestExecutionSummary.DefaultFailure is also safe to make serializable as it's a simple Java Bean with these two serializable fields.

I need to be able to serialize to disk the failures of a test for QuickPerf, a tool that I works on a JUnit5 implementation that allows to make rapid performance test with JUnit4 and soon 5.

As QuickPerf needs to launch a test in a separate JVM we need a way to pass the failures from one JVM to the other, and serializing them to disk is the easiest way to do it.


I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

@sbrannen
Copy link
Member

Thanks for the PR!

Tentatively slated for 5.6 M2 for team discussion ...

@loicmathieu loicmathieu force-pushed the serializable-testsummary-failure branch from 7d7bdd6 to 6bfa9d0 Compare October 24, 2019 13:50
The two components Throwable and TestIdentifier are serializable so it is safe to make is serializable also.

Regarding the default implementation DefaultFailure it is also safe to make it serializable.
@loicmathieu loicmathieu force-pushed the serializable-testsummary-failure branch from 6bfa9d0 to a1c7e2c Compare October 24, 2019 14:09
@marcphilipp
Copy link
Member

Team Decision: Let's do it.

@sbrannen sbrannen self-assigned this Oct 25, 2019
@sbrannen sbrannen changed the title Make TestExcecutionSummary.Failure serializable Make TestExecutionSummary.Failure serializable Oct 25, 2019
@sbrannen sbrannen merged commit 4f46537 into junit-team:master Oct 25, 2019
@sbrannen
Copy link
Member

This has been merged into master.

Thanks

sbrannen added a commit that referenced this pull request Oct 25, 2019
@loicmathieu loicmathieu deleted the serializable-testsummary-failure branch October 31, 2019 12:31
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.

3 participants