geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sai_boorlaga...@apache.org
Subject [24/55] [abbrv] incubator-geode git commit: GEODE-1360: Enabling to specify log4j2.xml for junit/dunit/intgrationtest
Date Tue, 24 May 2016 18:54:05 GMT
GEODE-1360: Enabling to specify log4j2.xml for junit/dunit/intgrationtest

Product code has built in log4j's trace log. However there's no command line
parameter to turn on it. This fix let gradlew to transfer the system property
to unit test framework, and let unit test framework to set it in run-time jvm.


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/717ba5c8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/717ba5c8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/717ba5c8

Branch: refs/heads/feature/GEODE-1153
Commit: 717ba5c8b45394c691b77d6a1bb83318bfa182da
Parents: eaa1593
Author: zhouxh <gzhou@pivotal.io>
Authored: Mon May 9 14:04:07 2016 -0700
Committer: zhouxh <gzhou@pivotal.io>
Committed: Mon May 9 14:07:18 2016 -0700

----------------------------------------------------------------------
 .../gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java    | 1 +
 .../gemstone/gemfire/test/dunit/standalone/ProcessManager.java   | 1 +
 gradle/test.gradle                                               | 4 ++++
 3 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/717ba5c8/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
index be459b9..f45d2dd 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
@@ -75,6 +75,7 @@ public class DUnitLauncher {
 
   /** change this to use a different log level in unit tests */
   public static final String LOG_LEVEL = System.getProperty("logLevel", "info");
+  public static final String LOG4J = System.getProperty("log4j.configurationFile");
   
   static int locatorPort;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/717ba5c8/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java
b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java
index dd532c4..489f72b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java
@@ -172,6 +172,7 @@ public class ProcessManager {
       "-Xrunjdwp:transport=dt_socket,server=y,suspend=" + jdkSuspend + jdkDebug,
       "-XX:+HeapDumpOnOutOfMemoryError",
       "-Xmx512m",
+      DUnitLauncher.LOG4J==null?"":"-Dlog4j.configurationFile="+DUnitLauncher.LOG4J,
       "-Dgemfire.DEFAULT_MAX_OPLOG_SIZE=10",
       "-Dgemfire.disallowMcastDefaults=true",
       "-ea", "-XX:+PrintGC", "-XX:+PrintGCDetails","-XX:+PrintGCTimeStamps",

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/717ba5c8/gradle/test.gradle
----------------------------------------------------------------------
diff --git a/gradle/test.gradle b/gradle/test.gradle
index 2dd7521..96fbfc5 100644
--- a/gradle/test.gradle
+++ b/gradle/test.gradle
@@ -211,6 +211,10 @@ subprojects {
         if (logLevel != null) {
           systemProperty 'logLevel', logLevel
         }
+        def log4jLocation = System.getProperty('log4j.configurationFile')
+        if (log4jLocation != null) {
+          systemProperty 'log4j.configurationFile', log4jLocation
+        }
 
         def eol = System.getProperty('line.separator')
         def progress = new File(resultsDir, "$test.name-progress.txt")


Mime
View raw message