Clear the logger configuration before "list" tests
[lttng-ust-java-tests.git] / lttng-ust-java-tests-log4j / src / test / java / org / lttng / ust / agent / integration / events / Log4jListEventsIT.java
index c7be8c84affb373f32a7cecade2b874cbdea72c4..7c1effa054f09fd67daf547e8b24c5193c3ed436 100644 (file)
@@ -21,6 +21,7 @@ package org.lttng.ust.agent.integration.events;
 import java.io.IOException;
 
 import org.apache.log4j.Appender;
+import org.apache.log4j.LogManager;
 import org.apache.log4j.Logger;
 import org.junit.After;
 import org.junit.AfterClass;
@@ -62,6 +63,10 @@ public class Log4jListEventsIT extends ListEventsITBase {
      */
     @Before
     public void log4jSetup() throws SecurityException, IOException {
+        /* Try clearing the log4j logger configuration */
+        LogManager.resetConfiguration();
+        System.gc();
+
         loggers = new Logger[] {
                 Logger.getLogger(LOGGER_NAME_1),
                 Logger.getLogger(LOGGER_NAME_2),
This page took 0.022799 seconds and 4 git commands to generate.