gdbtrace: Move plugins to the Trace Compass namespace
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.kernel.core.tests / src / org / eclipse / linuxtools / lttng2 / kernel / core / tests / stateprovider / StateSystemFullHistoryTest.java
index 88f5c3e9f592371415849f525d05446d214c1faa..a8a0f62db7a5805bd7fa397460588c19c3683ffa 100644 (file)
@@ -32,7 +32,6 @@ 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.After;
-import org.junit.Before;
 import org.junit.Test;
 
 /**
@@ -50,11 +49,8 @@ public class StateSystemFullHistoryTest extends StateSystemTest {
     private File stateFileBenchmark;
     private TestLttngKernelAnalysisModule module;
 
-    /**
-     * Initialize the test cases (build the history file once for all tests).
-     */
-    @Before
-    public void initialize() {
+    @Override
+    protected ITmfStateSystem initialize() {
         stateFile = createStateFile(TEST_FILE_NAME);
         stateFileBenchmark = createStateFile(BENCHMARK_FILE_NAME);
 
@@ -66,19 +62,23 @@ public class StateSystemFullHistoryTest extends StateSystemTest {
         }
         module.schedule();
         assertTrue(module.waitForCompletion());
-        ssq = module.getStateSystem();
-
-        assertNotNull(ssq);
+        return module.getStateSystem();
     }
 
     /**
      * Clean-up
      */
     @After
-    public void tearDownClass() {
-        module.close();
-        stateFile.delete();
-        stateFileBenchmark.delete();
+    public void cleanup() {
+        if (module != null) {
+            module.close();
+        }
+        if (stateFile != null) {
+            stateFile.delete();
+        }
+        if (stateFileBenchmark != null) {
+            stateFileBenchmark.delete();
+        }
     }
 
     // ------------------------------------------------------------------------
This page took 0.025323 seconds and 5 git commands to generate.