Provide default createSession() factory method
[lttng-ust-java-tests.git] / src / test / java / org / lttng / ust / agent / integration / jul / JulLegacyApiTest.java
index 5f6a9a0b6cd235b95c4ceb60a426ae912555827c..a088bb94eae0c0de03cbb1d1a2e8c90682ef8e76 100644 (file)
@@ -34,15 +34,19 @@ import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.lttng.tools.ILttngSession;
+import org.lttng.tools.ILttngSession.Domain;
+import org.lttng.tools.LttngToolsHelper;
+import org.lttng.tools.utils.LttngUtils;
 import org.lttng.ust.agent.ILttngHandler;
 import org.lttng.ust.agent.LTTngAgent;
-import org.lttng.ust.agent.utils.LttngSession;
-import org.lttng.ust.agent.utils.LttngSession.Domain;
-import org.lttng.ust.agent.utils.MiscTestUtils;
+import org.lttng.ust.agent.utils.TestPrintRunner;
 
 /**
  * Enabled events test for the LTTng-UST JUL log handler, using the legacy API.
  */
+@RunWith(TestPrintRunner.class)
 @SuppressWarnings("deprecation")
 public class JulLegacyApiTest {
 
@@ -51,7 +55,7 @@ public class JulLegacyApiTest {
     private static final String EVENT_NAME_A = "EventA";
     private static final String EVENT_NAME_B = "EventB";
 
-    private LttngSession session;
+    private ILttngSession session;
 
     private Logger loggerA;
     private Logger loggerB;
@@ -62,10 +66,10 @@ public class JulLegacyApiTest {
     @BeforeClass
     public static void julClassSetup() {
         /* Skip tests if we can't find the JNI library or lttng-tools */
-        assumeTrue(MiscTestUtils.checkForJulLibrary());
-        assumeTrue(MiscTestUtils.checkForLttngTools(Domain.JUL));
+        assumeTrue(LttngUtils.checkForJulLibrary());
+        assumeTrue(LttngUtils.checkForLttngTools(Domain.JUL));
 
-        LttngSession.destroyAllSessions();
+        LttngToolsHelper.destroyAllSessions();
     }
 
     /**
@@ -73,7 +77,7 @@ public class JulLegacyApiTest {
      */
     @AfterClass
     public static void julClassCleanup() {
-        LttngSession.deleteAllTracee();
+        LttngToolsHelper.deleteAllTraces();
     }
 
     /**
@@ -88,7 +92,7 @@ public class JulLegacyApiTest {
         loggerA.setLevel(Level.ALL);
         loggerB.setLevel(Level.ALL);
 
-        session = new LttngSession(null, DOMAIN);
+        session = ILttngSession.createSession(null, DOMAIN);
     }
 
     /**
This page took 0.023265 seconds and 4 git commands to generate.