You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by mi...@apache.org on 2016/04/08 14:04:17 UTC

[25/50] logging-log4j2 git commit: LOG4J2-1295 bugfix: this test will only pass if log4j is configured to be garbage-free. Skip this test in other configurations.

LOG4J2-1295	bugfix: this test will only pass if log4j is configured to be garbage-free. Skip this test in other configurations.


Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/450c98de
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/450c98de
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/450c98de

Branch: refs/heads/LOG4J2-1356
Commit: 450c98de9a14e3886296037cdf1f45f46d972f2e
Parents: b7bed7e
Author: rpopma <rp...@apache.org>
Authored: Thu Apr 7 03:47:31 2016 +0900
Committer: rpopma <rp...@apache.org>
Committed: Thu Apr 7 03:47:31 2016 +0900

----------------------------------------------------------------------
 .../java/org/apache/logging/log4j/core/GcFreeLoggingTest.java     | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/450c98de/log4j-core/src/test/java/org/apache/logging/log4j/core/GcFreeLoggingTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/GcFreeLoggingTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/GcFreeLoggingTest.java
index c151917..eafdac5 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/GcFreeLoggingTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/GcFreeLoggingTest.java
@@ -40,6 +40,9 @@ public class GcFreeLoggingTest {
 
     @Test
     public void testNoAllocationDuringSteadyStateLogging() throws Throwable {
+        if (!Constants.ENABLE_THREADLOCALS || !Constants.ENABLE_DIRECT_ENCODERS) {
+            return;
+        }
         final String javaHome = System.getProperty("java.home");
         final String javaBin = javaHome + File.separator + "bin" + File.separator + "java";
         final String classpath = System.getProperty("java.class.path");