import static org.junit.Assert.assertTrue;
-import java.io.IOException;
-
import org.junit.After;
import org.junit.Before;
import org.lttng.ust.agent.LTTngAgent;
import org.lttng.ust.agent.benchmarks.jul.handler.AbstractJulBenchmark;
-import org.lttng.ust.agent.utils.LttngSessionControl;
-import org.lttng.ust.agent.utils.LttngSessionControl.Domain;
+import org.lttng.ust.agent.utils.LttngSession;
+import org.lttng.ust.agent.utils.LttngSession.Domain;
@SuppressWarnings("deprecation")
public class OldLttngJulHandlerTracingDisabledBenchmark extends AbstractJulBenchmark {
+ private LttngSession session;
+
@Before
- public void testSetup() throws IOException {
+ public void testSetup() {
LTTngAgent.getLTTngAgent();
- assertTrue(LttngSessionControl.setupSession(null, Domain.JUL));
+ session = new LttngSession(null, Domain.JUL);
+ assertTrue(session.enableEvents("non-event"));
+ assertTrue(session.start());
}
@After
public void testTeardown() {
- assertTrue(LttngSessionControl.stopSession());
- assertTrue(LttngSessionControl.destroySession());
+ assertTrue(session.stop());
+ session.close();
LTTngAgent.dispose();
}