-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Log invalid search path roots #4823
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
Log invalid search path roots #4823
Conversation
I note that
|
@sormuras |
Love it. But should this not be WARN's ? Or as pointed out for javac - stderr message ? |
Good point. Updated the log level from INFO to WARN so that users can better notice invalid search path roots. |
Thanks for the feedback! I switched the level to To keep the console output stable while still alerting users, would you prefer:
I can implement (1) right away; it avoids changing the console output in common scenarios and keeps the tests green. If you’d rather go with (2), I’ll update the tests and docs. Also, do we want to mention this behavior in the User Guide (ConsoleLauncher section)? |
4237525
to
54426fe
Compare
Found the root cause of the test failure. I was running the build in Korea (ko_KR locale), and the execute-related tests did not explicitly set the language. I fixed this by forcing -Duser.language=en and -Duser.country=US in the relevant tests. |
744c29a
to
cb782d9
Compare
...platform-console/src/main/java/org/junit/platform/console/tasks/DiscoveryRequestCreator.java
Outdated
Show resolved
Hide resolved
platform-tests/src/test/java/org/junit/platform/console/tasks/DiscoveryRequestCreatorTests.java
Outdated
Show resolved
Hide resolved
...platform-console/src/main/java/org/junit/platform/console/tasks/DiscoveryRequestCreator.java
Outdated
Show resolved
Hide resolved
platform-tests/src/test/java/org/junit/platform/console/tasks/DiscoveryRequestCreatorTests.java
Outdated
Show resolved
Hide resolved
platform-tests/src/test/java/org/junit/platform/console/tasks/DiscoveryRequestCreatorTests.java
Outdated
Show resolved
Hide resolved
c161e9b
to
d38f38c
Compare
d38f38c
to
0a6ba3d
Compare
@marcphilipp Thanks! All suggested changes have been applied — please take a look when you can. |
...platform-console/src/main/java/org/junit/platform/console/tasks/DiscoveryRequestCreator.java
Outdated
Show resolved
Hide resolved
platform-tests/src/test/java/org/junit/platform/console/tasks/DiscoveryRequestCreatorTests.java
Outdated
Show resolved
Hide resolved
...platform-console/src/main/java/org/junit/platform/console/tasks/DiscoveryRequestCreator.java
Outdated
Show resolved
Hide resolved
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.
Could you please add an entry to documentation/src/docs/asciidoc/release-notes/release-notes-6.0.0-RC1.adoc
in the "JUnit Platform" > "New Features and Improvements" section?
Added a new entry in |
Thank you for you contribution, @currenjin! 🙇 |
Bumps `junit.version` from 5.13.4 to 6.0.0. Updates `org.junit.jupiter:junit-jupiter-engine` from 5.13.4 to 6.0.0 Release notes *Sourced from [org.junit.jupiter:junit-jupiter-engine's releases](https://github.com/junit-team/junit-framework/releases).* > JUnit 6.0.0 = Platform 6.0.0 + Jupiter 6.0.0 + Vintage 6.0.0 > > See [Release Notes](https://docs.junit.org/6.0.0/release-notes/). > > New Contributors > ---------------- > > * [`@2897robo`](https://github.com/2897robo) made their first contribution in [junit-team/junit-framework#4525](https://github.com/junit-team/junit-framework/pull/4525) > * [`@strangelookingnerd`](https://github.com/strangelookingnerd) made their first contribution in [junit-team/junit-framework#4683](https://github.com/junit-team/junit-framework/pull/4683) > * [`@eric6iese`](https://github.com/eric6iese) made their first contribution in [junit-team/junit-framework#4717](https://github.com/junit-team/junit-framework/pull/4717) > * [`@raccoonback`](https://github.com/raccoonback) made their first contribution in [junit-team/junit-framework#4822](https://github.com/junit-team/junit-framework/pull/4822) > * [`@currenjin`](https://github.com/currenjin) made their first contribution in [junit-team/junit-framework#4823](https://github.com/junit-team/junit-framework/pull/4823) > * [`@mehulimukherjee`](https://github.com/mehulimukherjee) made their first contribution in [junit-team/junit-framework#4913](https://github.com/junit-team/junit-framework/pull/4913) > * [`@lslonina`](https://github.com/lslonina) made their first contribution in [junit-team/junit-framework#4629](https://github.com/junit-team/junit-framework/pull/4629) > > **Full Changelog**: <junit-team/junit-framework@r5.14.0...r6.0.0> > > JUnit 6.0.0-RC3 = Platform 6.0.0-RC3 + Jupiter 6.0.0-RC3 + Vintage 6.0.0-RC3 > > See [Release Notes](https://docs.junit.org/6.0.0-RC3/release-notes/). > > New Contributors > ---------------- > > * [`@mehulimukherjee`](https://github.com/mehulimukherjee) made their first contribution in [junit-team/junit-framework#4913](https://github.com/junit-team/junit-framework/pull/4913) > * [`@lslonina`](https://github.com/lslonina) made their first contribution in [junit-team/junit-framework#4629](https://github.com/junit-team/junit-framework/pull/4629) > > **Full Changelog**: <junit-team/junit-framework@r6.0.0-RC2...r6.0.0-RC3> > > JUnit 6.0.0-RC2 = Platform 6.0.0-RC2 + Jupiter 6.0.0-RC2 + Vintage 6.0.0-RC2 > > See [Release Notes](https://docs.junit.org/6.0.0-RC2/release-notes/). > > **Full Changelog**: <junit-team/junit-framework@r6.0.0-RC1...r6.0.0-RC2> > > JUnit 6.0.0-RC1 = Platform 6.0.0-RC1 + Jupiter 6.0.0-RC1 + Vintage 6.0.0-RC1 > > See [Release Notes](https://docs.junit.org/6.0.0-RC1/release-notes/). > > New Contributors > ---------------- > > * [`@raccoonback`](https://github.com/raccoonback) made their first contribution in [junit-team/junit-framework#4822](https://github.com/junit-team/junit-framework/pull/4822) > * [`@currenjin`](https://github.com/currenjin) made their first contribution in [junit-team/junit-framework#4823](https://github.com/junit-team/junit-framework/pull/4823) > > **Full Changelog**: <junit-team/junit-framework@r6.0.0-M2...r6.0.0-RC1> > > JUnit 6.0.0-M2 = Platform 6.0.0-M2 + Jupiter 6.0.0-M2 + Vintage 6.0.0-M2 > > See [Release Notes](https://docs.junit.org/6.0.0-M2/release-notes/). > > New Contributors > ---------------- > > * [`@eric6iese`](https://github.com/eric6iese) made their first contribution in [junit-team/junit-framework#4717](https://github.com/junit-team/junit-framework/pull/4717) > > **Full Changelog**: <junit-team/junit-framework@r6.0.0-M1...r6.0.0-M2> ... (truncated) Commits * [`4f79594`](junit-team/junit-framework@4f79594) Release 6.0.0 * [`55af30a`](junit-team/junit-framework@55af30a) Revert "Use `develop/6.x` branch for junit-examples during release build" * [`df3cfdd`](junit-team/junit-framework@df3cfdd) Release 5.14.0 * [`fcb84a2`](junit-team/junit-framework@fcb84a2) Disable backward compatibility check when offline * [`c9c8344`](junit-team/junit-framework@c9c8344) Prune 5.14.0 release notes * [`03d8a72`](junit-team/junit-framework@03d8a72) Update broken link to using API Gaurdian with bndtools * [`3a0b29b`](junit-team/junit-framework@3a0b29b) Use temporary JUnit 6 logo * [`6603caa`](junit-team/junit-framework@6603caa) Rename `eclipseClasspath` to `eclipseConventions` to avoid confusion * [`ab3470b`](junit-team/junit-framework@ab3470b) Make sealed `MediaType` work in Eclipse * [`a8cd41e`](junit-team/junit-framework@a8cd41e) Remove annotations not visible in Eclipse * Additional commits viewable in [compare view](junit-team/junit-framework@r5.13.4...r6.0.0) Updates `org.junit.jupiter:junit-jupiter-params` from 5.13.4 to 6.0.0 Release notes *Sourced from [org.junit.jupiter:junit-jupiter-params's releases](https://github.com/junit-team/junit-framework/releases).* > JUnit 6.0.0 = Platform 6.0.0 + Jupiter 6.0.0 + Vintage 6.0.0 > > See [Release Notes](https://docs.junit.org/6.0.0/release-notes/). > > New Contributors > ---------------- > > * [`@2897robo`](https://github.com/2897robo) made their first contribution in [junit-team/junit-framework#4525](https://github.com/junit-team/junit-framework/pull/4525) > * [`@strangelookingnerd`](https://github.com/strangelookingnerd) made their first contribution in [junit-team/junit-framework#4683](https://github.com/junit-team/junit-framework/pull/4683) > * [`@eric6iese`](https://github.com/eric6iese) made their first contribution in [junit-team/junit-framework#4717](https://github.com/junit-team/junit-framework/pull/4717) > * [`@raccoonback`](https://github.com/raccoonback) made their first contribution in [junit-team/junit-framework#4822](https://github.com/junit-team/junit-framework/pull/4822) > * [`@currenjin`](https://github.com/currenjin) made their first contribution in [junit-team/junit-framework#4823](https://github.com/junit-team/junit-framework/pull/4823) > * [`@mehulimukherjee`](https://github.com/mehulimukherjee) made their first contribution in [junit-team/junit-framework#4913](https://github.com/junit-team/junit-framework/pull/4913) > * [`@lslonina`](https://github.com/lslonina) made their first contribution in [junit-team/junit-framework#4629](https://github.com/junit-team/junit-framework/pull/4629) > > **Full Changelog**: <junit-team/junit-framework@r5.14.0...r6.0.0> > > JUnit 6.0.0-RC3 = Platform 6.0.0-RC3 + Jupiter 6.0.0-RC3 + Vintage 6.0.0-RC3 > > See [Release Notes](https://docs.junit.org/6.0.0-RC3/release-notes/). > > New Contributors > ---------------- > > * [`@mehulimukherjee`](https://github.com/mehulimukherjee) made their first contribution in [junit-team/junit-framework#4913](https://github.com/junit-team/junit-framework/pull/4913) > * [`@lslonina`](https://github.com/lslonina) made their first contribution in [junit-team/junit-framework#4629](https://github.com/junit-team/junit-framework/pull/4629) > > **Full Changelog**: <junit-team/junit-framework@r6.0.0-RC2...r6.0.0-RC3> > > JUnit 6.0.0-RC2 = Platform 6.0.0-RC2 + Jupiter 6.0.0-RC2 + Vintage 6.0.0-RC2 > > See [Release Notes](https://docs.junit.org/6.0.0-RC2/release-notes/). > > **Full Changelog**: <junit-team/junit-framework@r6.0.0-RC1...r6.0.0-RC2> > > JUnit 6.0.0-RC1 = Platform 6.0.0-RC1 + Jupiter 6.0.0-RC1 + Vintage 6.0.0-RC1 > > See [Release Notes](https://docs.junit.org/6.0.0-RC1/release-notes/). > > New Contributors > ---------------- > > * [`@raccoonback`](https://github.com/raccoonback) made their first contribution in [junit-team/junit-framework#4822](https://github.com/junit-team/junit-framework/pull/4822) > * [`@currenjin`](https://github.com/currenjin) made their first contribution in [junit-team/junit-framework#4823](https://github.com/junit-team/junit-framework/pull/4823) > > **Full Changelog**: <junit-team/junit-framework@r6.0.0-M2...r6.0.0-RC1> > > JUnit 6.0.0-M2 = Platform 6.0.0-M2 + Jupiter 6.0.0-M2 + Vintage 6.0.0-M2 > > See [Release Notes](https://docs.junit.org/6.0.0-M2/release-notes/). > > New Contributors > ---------------- > > * [`@eric6iese`](https://github.com/eric6iese) made their first contribution in [junit-team/junit-framework#4717](https://github.com/junit-team/junit-framework/pull/4717) > > **Full Changelog**: <junit-team/junit-framework@r6.0.0-M1...r6.0.0-M2> ... (truncated) Commits * [`4f79594`](junit-team/junit-framework@4f79594) Release 6.0.0 * [`55af30a`](junit-team/junit-framework@55af30a) Revert "Use `develop/6.x` branch for junit-examples during release build" * [`df3cfdd`](junit-team/junit-framework@df3cfdd) Release 5.14.0 * [`fcb84a2`](junit-team/junit-framework@fcb84a2) Disable backward compatibility check when offline * [`c9c8344`](junit-team/junit-framework@c9c8344) Prune 5.14.0 release notes * [`03d8a72`](junit-team/junit-framework@03d8a72) Update broken link to using API Gaurdian with bndtools * [`3a0b29b`](junit-team/junit-framework@3a0b29b) Use temporary JUnit 6 logo * [`6603caa`](junit-team/junit-framework@6603caa) Rename `eclipseClasspath` to `eclipseConventions` to avoid confusion * [`ab3470b`](junit-team/junit-framework@ab3470b) Make sealed `MediaType` work in Eclipse * [`a8cd41e`](junit-team/junit-framework@a8cd41e) Remove annotations not visible in Eclipse * Additional commits viewable in [compare view](junit-team/junit-framework@r5.13.4...r6.0.0) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
cc. @maxandersen @marcphilipp
Summary
Detect and log non-existent, unreadable, or non-dir/jar classpath roots in
ConsoleLauncher
before discovery.This change improves diagnostics when using
--scan-class-path
with invalid entries, addressing issue #4772.Motivation
Currently, invalid search path roots are silently ignored, which may cause users to miss that some tests are not being discovered.
This PR makes such issues visible by logging them at
INFO-> WARN level, helping usersquickly identify and fix misconfigured paths.
Changes
validateAndLogInvalidRoots()
toDiscoveryRequestCreator
"Ignoring invalid search path root: %s (exists=%s, readable=%s, dirOrJar=%s)"
Before / After Example
Before (invalid path silently ignored):
After:
Related Issue
Closes #4772
I hereby agree to the terms of the JUnit Contributor License Agreement.
Definition of Done
@API
annotations