This is an automated email from the ASF dual-hosted git repository.

vy pushed a commit to branch 2.x-java-17
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit 1e1a1f478d53331e2ac77b1aeea71b4b59a375a0
Author: Volkan Yazıcı <[email protected]>
AuthorDate: Thu Nov 30 11:00:10 2023 +0100

    Fix Java 17 failures in `ThreadContextInheritanceTest`
---
 .../org/apache/logging/log4j/ThreadContextInheritanceTest.java     | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git 
a/log4j-api-test/src/test/java/org/apache/logging/log4j/ThreadContextInheritanceTest.java
 
b/log4j-api-test/src/test/java/org/apache/logging/log4j/ThreadContextInheritanceTest.java
index 26fb296a6d..96783ae600 100644
--- 
a/log4j-api-test/src/test/java/org/apache/logging/log4j/ThreadContextInheritanceTest.java
+++ 
b/log4j-api-test/src/test/java/org/apache/logging/log4j/ThreadContextInheritanceTest.java
@@ -24,6 +24,9 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
 import org.apache.logging.log4j.spi.DefaultThreadContextMap;
 import org.apache.logging.log4j.test.ThreadContextUtilityClass;
 import org.apache.logging.log4j.test.junit.InitializesThreadContext;
+import org.apache.logging.log4j.test.junit.SetTestProperty;
+import org.apache.logging.log4j.test.junit.UsingThreadContextMap;
+import org.apache.logging.log4j.test.junit.UsingThreadContextStack;
 import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Tag;
@@ -33,8 +36,10 @@ import org.junitpioneer.jupiter.SetSystemProperty;
 /**
  * Tests {@link ThreadContext}.
  */
-@SetSystemProperty(key = DefaultThreadContextMap.INHERITABLE_MAP, value = 
"true")
+@SetTestProperty(key = DefaultThreadContextMap.INHERITABLE_MAP, value = "true")
 @InitializesThreadContext
+@UsingThreadContextMap
+@UsingThreadContextStack
 public class ThreadContextInheritanceTest {
 
     @BeforeAll

Reply via email to