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
[SUREFIRE-2015] Implement testRunId and RunMode in the SimpleReportEntry #482
Conversation
@slachiewicz |
@slachiewicz |
@slachiewicz |
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.
please add javadocs for new interface/ classes 😄
public RunMode markAs( RunMode currentRunMode ) | ||
{ | ||
RunMode runMode = this.runMode; | ||
this.runMode = requireNonNull( currentRunMode ); |
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.
private field runMode
can be removed
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.
Thx, done :-)
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.
The RunMode will be finally removed in AbstractStandardStreamEvent and EventChannelEncoder in the SUREFIRE-2014.
@slawekjaranowski Javadoc was added. |
This PR is the most important because it implements
RunMode
andtestRunId
in theReportEntry
,TestSetReportEntry
,SimpleReportEntry
,CategorizedReportEntry
andWrappedReportEntry
in appropriate implementation form.Additionally, I had to distinguish between two events (
OutputReportEntry
,TestOutputReportEntry
) and therefore the interfaceTestReportListener
handles them via generics dependeing on the situation.The first situation happens when provider's listeners handles the event
OutputReportEntry
fromSystem.out
andSystem.err
via theConsoleOutputCapture
. TheConsoleOutputCapture
does not have any notion aboutrunMode
andtestRunId
, and therefore the only provider's listener would addrunMode
andtestRunId
to a recreated entry which would be finally propagated to theForkingRunListener
andTestSetRunListener
. TherunMode
andtestRunId
are determined opon the eventstestStarted
and any test end and Thread local.The second situation happens when
ForkingRunListener
andTestSetRunListener
handlesTestOutputReportEntry
which containsrunMode
andtestRunId
.Some classes are deprecated in the module
surefire-junit47
and can be freely removed after the XML Reporter would be fully capable of parallel tests (must support events chaos in one thread). That's the reason why parallel tests are badly handled in JUnit5 reports. The providersurefire-junit47
also supports parallel tests and we do not see the problem with undeterministic XML report, but the reason is that the provider has a cache, eats the memory including the std/out logs and all the messages and test events are replayed in a sequence as if the tests were executed in one thread.Following this checklist to help us incorporate your
contribution quickly and easily:
for the change (usually before you start working on it). Trivial changes like typos do not
require a JIRA issue. Your pull request should address just this issue, without
pulling in other changes.
[SUREFIRE-XXX] - Fixes bug in ApproximateQuantiles
,where you replace
SUREFIRE-XXX
with the appropriate JIRA issue. Best practiceis to use the JIRA issue title in the pull request title and in the first line of the
commit message.
mvn clean install
to make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
mvn -Prun-its clean install
).If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.
To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.
I hereby declare this contribution to be licenced under the Apache License Version 2.0, January 2004
In any other case, please file an Apache Individual Contributor License Agreement.