-
Notifications
You must be signed in to change notification settings - Fork 23
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
Resolve the issues reported in #110 with bad reporting of errors #111
Resolve the issues reported in #110 with bad reporting of errors #111
Conversation
@@ -16,7 +16,7 @@ allprojects { | |||
dependencies { | |||
compile group: 'junit', name: 'junit', version: '4.12' | |||
testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3' | |||
testCompile group: 'org.mockito', name: 'mockito-core', version: '1.10.19' | |||
testCompile group: 'org.mockito', name: 'mockito-core', version: '2.7.22' |
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.
Upgraded to the latest Mockito
to allow easier argThat
@@ -257,7 +258,7 @@ public Description getDescription() { | |||
|
|||
@Override | |||
public void run(final RunNotifier notifier) { | |||
this.rootSuite.run(notifier); | |||
this.rootSuite.run(new RunNotifierReporting(notifier)); |
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 real run notifier is wrapped by the reporting
interface.
Codecov Report
@@ Coverage Diff @@
## master #111 +/- ##
============================================
+ Coverage 99.4% 99.43% +0.03%
- Complexity 312 331 +19
============================================
Files 39 40 +1
Lines 669 714 +45
Branches 16 21 +5
============================================
+ Hits 665 710 +45
Partials 4 4
|
suite.runChild(child, runNotifier); | ||
private static void abortOnFailureChildRunner(final Suite suite, | ||
final RunReporting<Description, Failure> reporting) { | ||
FailureDetectingRunDecorator<Description, Failure> decoratedReporting = |
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.
This decorator simplifies the method a lot. We no longer add a listener to the RunNotifier
but instead wrap the Reporting
with a sentinel.
.filter(child -> !child.isEffectivelyIgnored()) | ||
.findFirst() | ||
.isPresent(); | ||
.anyMatch(child -> !child.isEffectivelyIgnored()); |
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.
Simplification suggested by IntelliJ.
01e139f
to
8f555fe
Compare
…ups not reported correctly
3332640
to
7dd4871
Compare
@ashleyfrieze looks great to me. If you confirmed that it gets the right IDE behavior, I'm ready to merge. 👍 Also has nice side effect, as you mentioned, of starting to isolate us incrementally away from the JUnit4 |
I'm pretty happy with this. Can you release it too? I feel bad that the general release has this howler in it? |
Fixes #110
Errors were reported in the wrong order confusing IDE JUnit runners