Add log4j2 agent tests
[lttng-ust-java-tests.git] / lttng-ust-java-tests-log4j / src / test / java / org / lttng / ust / agent / integration / events / Log4jEnabledEventsIT.java
index 1642b6a4a024b40610f932f32f7f16f158c2cc0d..34bfdf7257249944e3cd3179ddc16b42474e7b2e 100644 (file)
@@ -18,8 +18,6 @@
 
 package org.lttng.ust.agent.integration.events;
 
-import static org.junit.Assume.assumeTrue;
-
 import java.io.IOException;
 
 import org.apache.log4j.Appender;
@@ -31,10 +29,8 @@ import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.lttng.tools.ILttngSession.Domain;
-import org.lttng.tools.LttngToolsHelper;
 import org.lttng.ust.agent.log4j.LttngLogAppender;
 import org.lttng.ust.agent.utils.Log4jTestUtils;
-import org.lttng.ust.agent.utils.LttngUtils;
 
 /**
  * Enabled events test for the LTTng-UST Log4j log handler.
@@ -53,19 +49,15 @@ public class Log4jEnabledEventsIT extends EnabledEventsITBase {
      */
     @BeforeClass
     public static void log4jClassSetup() {
-        /* Skip tests if we can't find the JNI library or lttng-tools */
-        assumeTrue(Log4jTestUtils.checkForLog4jLibrary());
-        assumeTrue(LttngUtils.checkForLttngTools(Domain.LOG4J));
-
-        LttngToolsHelper.destroyAllSessions();
+        Log4jTestUtils.testClassSetup();
     }
 
     /**
-     * Class teardown
+     * Class cleanup
      */
     @AfterClass
     public static void log4jClassCleanup() {
-        LttngToolsHelper.deleteAllTraces();
+        Log4jTestUtils.testClassCleanup();
     }
 
     /**
@@ -115,6 +107,12 @@ public class Log4jEnabledEventsIT extends EnabledEventsITBase {
         return DOMAIN;
     }
 
+    @Override
+    protected boolean closeHandlers()
+    {
+        return true;
+    }
+
     @Override
     protected void sendEventsToLoggers() {
         Log4jTestUtils.send10Events(loggerA);
This page took 0.023046 seconds and 4 git commands to generate.