-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[JUnit Platform] Use EngineDiscoveryRequestResolver #2835
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2835 +/- ##
============================================
+ Coverage 84.80% 84.86% +0.06%
+ Complexity 2728 2719 -9
============================================
Files 331 334 +3
Lines 9428 9569 +141
Branches 902 932 +30
============================================
+ Hits 7995 8121 +126
- Misses 1111 1118 +7
- Partials 322 330 +8 ☔ View full report in Codecov by Sentry. |
29ff69e
to
bd9ac67
Compare
The current implementation of the JUnit Platform Engine treats Cucumbers documentation consistently uses This will become a problem if/when we start to use the |
"\n" + | ||
"This is a work around for the limited JUnit 5 support in Maven and Gradle. " + | ||
"Please request/upvote/sponsor/ect better support for JUnit 5 discovery selectors. " + | ||
"For details see: https://github.com/cucumber/cucumber-jvm/pull/2498\n" + |
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 should also be interesting for you (if/when it gets merged):
gradle/gradle#29535
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.
Great to see this being used here now! 👍
class IsFeature implements Predicate<Resource> { | ||
@Override | ||
public boolean test(Resource resource) { | ||
return resource.getUri().toString().endsWith(".feature"); |
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.
Wouldn't checking Resource.getName()
suffice here?
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.
Good one. Cheers.
sortedChildren.forEach(descriptor::removeChild); | ||
sortedChildren.forEach(descriptor::addChild); |
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.
I wonder if we should introduce an TestDescriptor.orderChildren(UnaryOperator<TestDescriptor> orderer)
method (or similar). We could also make use of that in Jupiter. 🤔
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.
That would be most useful! Though I'm not sure I understand the signature. Were you thinking of Comparator<TestDescriptor>
?
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.
Sorry, I meant UnaryOperator<List<TestDescriptor>>
. While a Comparator
makes sense as well, in some cases (think Collections.shuffle
) it's easier to return a new list. The implementation should verify that no elements were added or removed.
🤔 What's changed?
⚡️ What's your motivation?
Fully utilize the
EngineDiscoveryRequestResolver
API to reduce our own complexity (junit-team/junit5#3705, junit-team/junit5#3718)🏷️ What kind of change is this?
♻️ Anything particular you want feedback on?
📋 Checklist: