-
-
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
base: main
Are you sure you want to change the base?
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
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