kafka/connect
Hong-Yi Chen dc82c766fa
KAFKA-18834 Fix LoggingResourceTest#testSetLevelDefaultScope (#19920)
- 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, which causes subsequent tests
to fail to emit WARN-level output.

- Fix in this PR
Resets the Log4j configuration after each test in `LoggersTest`,
ensuring that any global changes are reverted.

Reviewers: Chia-Ping Tsai <chia7712@gmail.com>
2025-06-26 13:39:08 +08:00
..
api KAFKA-15995: Adding KIP-877 support to Connect (#17804) 2025-02-11 18:27:15 +01:00
basic-auth-extension MINOR: Cleanup simplify set initialization with Set.of (#19925) 2025-06-11 18:36:14 +08:00
file/src KAFKA-19137 Use `StandardCharsets.UTF_8` instead of `StandardCharsets.UTF_8.name()` (#19464) 2025-04-15 23:44:00 +08:00
json MINOR: Cleanup simplify set initialization with Set.of (#19925) 2025-06-11 18:36:14 +08:00
mirror/src MINOR: Cleanup simplify set initialization with Set.of (#19925) 2025-06-11 18:36:14 +08:00
mirror-client/src MINOR: Cleanup simplify set initialization with Set.of (#19925) 2025-06-11 18:36:14 +08:00
runtime/src KAFKA-18834 Fix LoggingResourceTest#testSetLevelDefaultScope (#19920) 2025-06-26 13:39:08 +08:00
test-plugins/src/main MINOR: Add javadoc for Connect public packages/classes (#16404) 2024-06-21 10:23:35 +02:00
transforms/src MINOR: Fix typos in multiple files (#19102) 2025-03-05 14:27:32 +00:00