TMF: Add assert exists and dispose to traces in synchronization tests
authorGeneviève Bastien <gbastien+lttng@versatic.net>
Mon, 25 Nov 2013 22:03:46 +0000 (17:03 -0500)
committerGenevieve Bastien <gbastien+lttng@versatic.net>
Tue, 26 Nov 2013 21:03:16 +0000 (16:03 -0500)
Change-Id: Ida426ccb6abe6404aa6c443dc5ae38b8d175f745
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/18862
Tested-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im>

org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/event/matchandsync/ExperimentSyncTest.java
org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/event/matchandsync/MatchAndSyncTest.java

index 7f6aef641becda08bb0a2bb5c24efe78fccedd44..37284ada864c9331ba83b84f5fc6fc0b1e59e864 100644 (file)
@@ -14,6 +14,7 @@ package org.eclipse.linuxtools.lttng2.kernel.core.tests.event.matchandsync;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
 
 import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpEventMatching;
 import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpLttngEventMatching;
@@ -49,6 +50,8 @@ public class ExperimentSyncTest {
      */
     @Before
     public void setUp() {
+        assumeTrue(CtfTmfTestTrace.SYNC_SRC.exists());
+        assumeTrue(CtfTmfTestTrace.SYNC_DEST.exists());
         CtfTmfTrace trace1 = CtfTmfTestTrace.SYNC_SRC.getTrace();
         CtfTmfTrace trace2 = CtfTmfTestTrace.SYNC_DEST.getTrace();
 
@@ -69,6 +72,8 @@ public class ExperimentSyncTest {
     public void cleanUp() {
         fTraces[0].setTimestampTransform(TmfTimestampTransform.IDENTITY);
         fTraces[1].setTimestampTransform(TmfTimestampTransform.IDENTITY);
+        CtfTmfTestTrace.SYNC_SRC.dispose();
+        CtfTmfTestTrace.SYNC_DEST.dispose();
     }
 
     /**
index 4d317ea62de311d62764f03b575ff15b1d7856cf..6d8856db814f7f5a85045ccee9194a4aed5cf895 100644 (file)
@@ -14,6 +14,7 @@ package org.eclipse.linuxtools.lttng2.kernel.core.tests.event.matchandsync;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeTrue;
 
 import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpEventMatching;
 import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpLttngEventMatching;
@@ -37,6 +38,8 @@ public class MatchAndSyncTest {
     @Test
     public void testMatching() {
         final String cr = System.getProperty("line.separator");
+        assumeTrue(CtfTmfTestTrace.SYNC_SRC.exists());
+        assumeTrue(CtfTmfTestTrace.SYNC_DEST.exists());
         CtfTmfTrace trace1 = CtfTmfTestTrace.SYNC_SRC.getTrace();
         CtfTmfTrace trace2 = CtfTmfTestTrace.SYNC_DEST.getTrace();
 
@@ -58,6 +61,9 @@ public class MatchAndSyncTest {
                 "Trace 1:" + cr +
                 "  2 unmatched incoming events" + cr +
                 "  1 unmatched outgoing events" + cr, stats);
+
+        CtfTmfTestTrace.SYNC_SRC.dispose();
+        CtfTmfTestTrace.SYNC_DEST.dispose();
     }
 
 }
This page took 0.026583 seconds and 5 git commands to generate.