package org.lttng.ust.agent.integration.filter;
import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
import java.io.IOException;
import java.util.logging.Handler;
import java.util.logging.Level;
import java.util.logging.Logger;
+import org.junit.AfterClass;
import org.junit.BeforeClass;
-import org.lttng.tools.LttngToolsHelper;
import org.lttng.tools.ILttngSession.Domain;
import org.lttng.ust.agent.jul.LttngLogHandler;
import org.lttng.ust.agent.utils.JulTestUtils;
-import org.lttng.ust.agent.utils.LttngUtils;
/**
* Implementation of {@link FilterListenerOrderingITBase} for the JUL API.
*/
@BeforeClass
public static void julClassSetup() {
- /* Skip tests if we can't find the JNI library or lttng-tools */
- assumeTrue(JulTestUtils.checkForJulLibrary());
- assumeTrue(LttngUtils.checkForLttngTools(Domain.JUL));
+ JulTestUtils.testClassSetup();
+ }
- LttngToolsHelper.destroyAllSessions();
+ /**
+ * Class cleanup
+ */
+ @AfterClass
+ public static void julClassCleanup() {
+ JulTestUtils.testClassCleanup();
}
@Override
try {
handler = new LttngLogHandler();
} catch (SecurityException | IOException e) {
- fail();
+ fail(e.getMessage());
}
logger.addHandler(handler);
}