-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
Junit5 test discovery reports spurious test runs for non-test classes (500USD bounty) #3910
Comments
Mitigates #3910 by hackily filtering out all anonymous classes, but non-anonymous non-test classes still cause the problem Added a unit test to check this specific misbehavior
With Mill snapshot release |
Yes, because currently all classes in the test module are treated as test classes, regardless of the presence of superclass or annotation. https://github.com/sbt/sbt-jupiter-interface says
We probably need to see why they need to have special treatment for junit 5 in SBT, and whether we need to replicate that special treatment in Mill |
This changes discovery of test classes for Junit5, to be in line with that of sbt-jupiter-interface. Closes #3910
This changes discovery of test classes for Junit5, to be in line with that of sbt-jupiter-interface. Closes #3910
From the maintainer Li Haoyi: I'm putting a 500USD bounty on this issue, payable by bank transfer on a merged PR implementing this.
First noticed when reviewing #3886
The line
Test run finished: 0 failed, 0 ignored, 2 total
is correct, but there also are three lineTest run finished: 0 failed, 0 ignored, 0 total
which are spurious. It seems to be something to do with the test framework incorrectly picking up the anonymous lambda classes as test classes, even though they have no testsAlso happens for non-kotlin tests, e.g. here is a standalone repro using Java/junit5 where the
class Dummy
causes a spuriousTest run finished: 0 failed, 0 ignored, 0 total
to be loggedThe text was updated successfully, but these errors were encountered: