import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
import org.junit.After;
import org.junit.Before;
+import org.junit.BeforeClass;
import org.junit.Test;
import com.google.common.collect.ImmutableSet;
private ITmfTrace fTrace;
private LttngKernelAnalysisModule fKernelAnalysisModule;
+ /**
+ * Class setup
+ */
+ @BeforeClass
+ public static void setUpClass() {
+ assumeTrue(CtfTmfTestTrace.KERNEL.exists());
+ }
+
/**
* Set-up the test
*/
@Before
public void setUp() {
fKernelAnalysisModule = new LttngKernelAnalysisModule();
- assumeTrue(CtfTmfTestTrace.KERNEL.exists());
fTrace = CtfTmfTestTrace.KERNEL.getTrace();
}
import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
import org.junit.After;
import org.junit.Before;
+import org.junit.BeforeClass;
import org.junit.Test;
/**
private static TmfExperiment fExperiment;
/**
- * Setup the traces and experiment
+ * Class setup
*/
- @Before
- public void setUp() {
+ @BeforeClass
+ public static void setUpClass() {
assumeTrue(CtfTmfTestTrace.SYNC_SRC.exists());
assumeTrue(CtfTmfTestTrace.SYNC_DEST.exists());
+ }
+ /**
+ * Setup the traces and experiment
+ */
+ @Before
+ public void setUp() {
fTraces = new CtfTmfTrace[2];
fTraces[0] = CtfTmfTestTrace.SYNC_SRC.getTrace();
fTraces[1] = CtfTmfTestTrace.SYNC_DEST.getTrace();
import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
import org.eclipse.linuxtools.tmf.core.trace.TmfTraceManager;
import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
/**
private static final @NonNull String TEST_FILE_NAME = "test-partial";
- private static File stateFile;
- private static TestLttngKernelAnalysisModule module;
+ private File stateFile;
+ private TestLttngKernelAnalysisModule module;
/**
* Initialization
*/
- @BeforeClass
- public static void initialize() {
+ @Before
+ public void initialize() {
assumeTrue(testTrace.exists());
stateFile = new File(TmfTraceManager.getSupplementaryFileDir(testTrace.getTrace()) + TEST_FILE_NAME);
if (stateFile.exists()) {
/**
* Class clean-up
*/
- @AfterClass
- public static void tearDownClass() {
+ @After
+ public void tearDownClass() {
module.close();
stateFile.delete();
}
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
import java.io.File;
import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
import org.eclipse.linuxtools.tmf.core.trace.TmfTraceManager;
import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
/**
private static final @NonNull String TEST_FILE_NAME = "test.ht";
private static final @NonNull String BENCHMARK_FILE_NAME = "test.benchmark.ht";
- private static File stateFile;
- private static File stateFileBenchmark;
- private static TestLttngKernelAnalysisModule module;
+ private File stateFile;
+ private File stateFileBenchmark;
+ private TestLttngKernelAnalysisModule module;
/**
* Initialize the test cases (build the history file once for all tests).
*/
- @BeforeClass
- public static void initialize() {
- assumeTrue(testTrace.exists());
+ @Before
+ public void initialize() {
stateFile = createStateFile(TEST_FILE_NAME);
stateFileBenchmark = createStateFile(BENCHMARK_FILE_NAME);
/**
* Clean-up
*/
- @AfterClass
- public static void tearDownClass() {
+ @After
+ public void tearDownClass() {
module.close();
stateFile.delete();
stateFileBenchmark.delete();
import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
+import org.junit.After;
+import org.junit.Before;
/**
* State system tests using the in-memory back-end.
*/
public class StateSystemInMemoryTest extends StateSystemTest {
- private static TestLttngKernelAnalysisModule module;
+ private TestLttngKernelAnalysisModule module;
/**
* Initialization
*/
- @BeforeClass
- public static void initialize() {
+ @Before
+ public void initialize() {
assumeTrue(testTrace.exists());
module = new TestLttngKernelAnalysisModule();
/**
* Class cleanup
*/
- @AfterClass
- public static void cleanupClass() {
+ @After
+ public void cleanupClass() {
module.close();
}
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
import java.util.List;
import org.eclipse.linuxtools.statesystem.core.interval.ITmfStateInterval;
import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
+import org.junit.BeforeClass;
import org.junit.Test;
/**
/* Offset in the trace + start time of the trace */
static final long interestingTimestamp1 = 18670067372290L + 1331649577946812237L;
+ /**
+ * Class set-up
+ */
+ @BeforeClass
+ public static void setUpClass() {
+ assumeTrue(testTrace.exists());
+ }
+
@Test
public void testFullQuery1() {
List<ITmfStateInterval> list;