apalan60 opened a new pull request, #19920: URL: https://github.com/apache/kafka/pull/19920
Jira: [KAFKA-18834](https://issues.apache.org/jira/browse/KAFKA-18834) - Flaky behavior `LoggingResourceTest#testSetLevelDefaultScope` sometimes fails by not capturing its expected WARN log. - Root cause Both `LoggersTest#testSetLevelWithValidRootLoggerNames` and `LoggingResourceTest#testSetLevelDefaultScope` may share the same `LoggerContext` when executed in the same JVM. `LoggersTest#testSetLevelWithValidRootLoggerNames` calls `loggers.setLevel("", ERROR)`, which mutates the global root logger level to ERROR and suppresses WARN logs—causing subsequent tests to fail to emit WARN-level output. - Fix in this PR The original root level is saved before each test in `LoggersTest` and restored after the test completes. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org