bito-code-review[bot] commented on PR #15993:
URL: https://github.com/apache/grails-core/pull/15993#issuecomment-5002040203
<!-- Bito Reply -->
The concern regarding multiple SLF4J providers on the test classpath is
valid, as SLF4J 2.x can exhibit non-deterministic behavior in such
environments. The current PR introduces a new test, `GrailsConsoleLoggingSpec`,
which explicitly manages the test runtime classpath by filtering out
`slf4j-simple` and `logback-classic` when `apiOnly` is true. This approach
effectively isolates the test environment to verify logging behavior without
ambiguous bindings, aligning with the goal of having a controlled provider
environment during testing.
**grails-bootstrap/src/test/groovy/grails/build/logging/GrailsConsoleLoggingSpec.groovy**
```
private static String testRuntimeClasspath(boolean apiOnly) {
String[] entries =
System.getProperty('java.class.path').split(File.pathSeparator)
if (!apiOnly) {
return entries.join(File.pathSeparator)
}
entries.findAll { !it.contains('slf4j-simple') &&
!it.contains('logback-classic') }.join(File.pathSeparator)
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]