summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorBernd Hufmann2012-12-10 12:21:48 (EST)
committer Bernd Hufmann2012-12-10 14:40:23 (EST)
commit29ad26d28c0b0fea1efbec2355f0bb9c7510252f (patch)
treebb673c847e48afd461e05013fd9f09ea24122cca
parent263ddc2ca53417ef0bf529626b765177edd1eac9 (diff)
downloadorg.eclipse.linuxtools-29ad26d28c0b0fea1efbec2355f0bb9c7510252f.zip
org.eclipse.linuxtools-29ad26d28c0b0fea1efbec2355f0bb9c7510252f.tar.gz
org.eclipse.linuxtools-29ad26d28c0b0fea1efbec2355f0bb9c7510252f.tar.bz2
Fix order of execution in CTF JUnit tests.refs/changes/46/9146/2
The order of test case within a JUnit tests file doesn't ensure the order of execution. So, each test case within a file have to be self-contained. Change-Id: Ie7cdff17f4c176062a4eabd038de3870e44834de Reviewed-on: https://git.eclipse.org/r/9146 Tested-by: Hudson CI Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im> IP-Clean: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
-rw-r--r--lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceTest.java16
1 files changed, 7 insertions, 9 deletions
diff --git a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceTest.java b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceTest.java
index 2629665..fa9c087 100644
--- a/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceTest.java
+++ b/lttng/org.eclipse.linuxtools.ctf.core.tests/src/org/eclipse/linuxtools/ctf/core/tests/trace/CTFTraceTest.java
@@ -104,9 +104,16 @@ public class CTFTraceTest {
*/
@Test
public void testAddStream() throws ParseException, CTFReaderException {
+ // test number of streams
+ int nbStreams = fixture.nbStreams();
+ assertEquals(1, nbStreams);
+ // Add a stream
Stream stream = new Stream(TestParams.createTrace());
stream.setId(1234);
fixture.addStream(stream);
+ // test number of streams
+ nbStreams = fixture.nbStreams();
+ assertEquals(2, nbStreams);
}
/**
@@ -229,15 +236,6 @@ public class CTFTraceTest {
}
/**
- * Run the int nbStreams() method test.
- */
- @Test
- public void testNbStreams() {
- int result = fixture.nbStreams();
- assertEquals(2, result);
- }
-
- /**
* Run the boolean packetHeaderIsSet() method test with a valid header set.
*/
@Test