ppkarwasz commented on code in PR #3263: URL: https://github.com/apache/logging-log4j2/pull/3263#discussion_r1873695806
########## log4j-core-test/src/test/java/org/apache/logging/log4j/core/LoggerMessageFactoryCustomizationTest.java: ########## @@ -24,34 +24,36 @@ import org.apache.logging.log4j.message.MessageFactory; import org.apache.logging.log4j.message.ParameterizedMessageFactory; import org.junit.jupiter.api.Test; -import org.junitpioneer.jupiter.ClearSystemProperty; import org.junitpioneer.jupiter.SetSystemProperty; +@SetSystemProperty( + key = "log4j2.messageFactory", + value = "org.apache.logging.log4j.core.LoggerMessageFactoryCustomizationTest$TestMessageFactory") +@SetSystemProperty( + key = "log4j2.flowMessageFactory", + value = "org.apache.logging.log4j.core.LoggerMessageFactoryCustomizationTest$TestFlowMessageFactory") class LoggerMessageFactoryCustomizationTest { @Test - @ClearSystemProperty(key = "log4j2.messageFactory") - @ClearSystemProperty(key = "log4j2.flowMessageFactory") void arguments_should_be_honored() { - final LoggerContext loggerContext = - new LoggerContext(LoggerMessageFactoryCustomizationTest.class.getSimpleName()); - final Logger logger = new Logger( - loggerContext, "arguments_should_be_honored", new TestMessageFactory(), new TestFlowMessageFactory()); - assertTestMessageFactories(logger); + try (LoggerContext loggerContext = + new LoggerContext(LoggerMessageFactoryCustomizationTest.class.getSimpleName())) { + Logger logger = new Logger( + loggerContext, + "arguments_should_be_honored", Review Comment: Fixed in https://github.com/apache/logging-log4j2/pull/3263/commits/3c3e29b4a2b730885dca4885ff0b15facebb10bb. ########## log4j-core-test/src/test/java/org/apache/logging/log4j/core/LoggerMessageFactoryCustomizationTest.java: ########## @@ -24,34 +24,36 @@ import org.apache.logging.log4j.message.MessageFactory; import org.apache.logging.log4j.message.ParameterizedMessageFactory; import org.junit.jupiter.api.Test; -import org.junitpioneer.jupiter.ClearSystemProperty; import org.junitpioneer.jupiter.SetSystemProperty; +@SetSystemProperty( Review Comment: Fixed in https://github.com/apache/logging-log4j2/pull/3263/commits/3c3e29b4a2b730885dca4885ff0b15facebb10bb. -- 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: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org