projects
/
deliverable
/
tracecompass.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lttng: Don't throw irrelevant exceptions in state system tests
[deliverable/tracecompass.git]
/
org.eclipse.linuxtools.lttng2.kernel.core.tests
/
src
/
org
/
eclipse
/
linuxtools
/
lttng2
/
kernel
/
core
/
tests
/
stateprovider
/
StateSystemFullHistoryTest.java
diff --git
a/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/StateSystemFullHistoryTest.java
b/org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/StateSystemFullHistoryTest.java
index 1d0178f3ba12ea00914c5332202abd6dfe044af8..04514caf5505106ea8f953308f5f2b1366387ff2 100644
(file)
--- a/
org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/StateSystemFullHistoryTest.java
+++ b/
org.eclipse.linuxtools.lttng2.kernel.core.tests/src/org/eclipse/linuxtools/lttng2/kernel/core/tests/stateprovider/StateSystemFullHistoryTest.java
@@
-14,6
+14,7
@@
package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
import static org.junit.Assume.assumeTrue;
import java.io.File;
import static org.junit.Assume.assumeTrue;
import java.io.File;
@@
-68,38
+69,37
@@
public class StateSystemFullHistoryTest extends StateSystemTest {
/**
* Rebuild independently so we can benchmark it. Too bad JUnit doesn't allow
* us to @Test the @BeforeClass...
/**
* Rebuild independently so we can benchmark it. Too bad JUnit doesn't allow
* us to @Test the @BeforeClass...
- *
- * @throws TmfTraceException
- * Fails the test
*/
@Test
*/
@Test
- public void testBuild() throws TmfTraceException {
- IStateChangeInput input2;
- ITmfStateSystem ssb2;
+ public void testBuild() {
+ try {
+ IStateChangeInput input2 = new CtfKernelStateInput(CtfTmfTestTraces.getTestTrace(TRACE_INDEX));
+ ITmfStateSystem ssb2 = StateSystemManager.loadStateHistory(stateFileBenchmark, input2, true);
-
input2 = new CtfKernelStateInput(CtfTmfTestTraces.getTestTrace(TRACE_INDEX
));
-
ssb2 = StateSystemManager.loadStateHistory(stateFileBenchmark, input2, true
);
+
assertEquals(startTime, ssb2.getStartTime(
));
+
assertEquals(endTime, ssb2.getCurrentEndTime()
);
- assertEquals(startTime, ssb2.getStartTime());
- assertEquals(endTime, ssb2.getCurrentEndTime());
+ } catch (TmfTraceException e) {
+ fail();
+ }
}
/**
* Test re-opening the existing file.
}
/**
* Test re-opening the existing file.
- *
- * @throws TmfTraceException
- * Fails the test
*/
@Test
*/
@Test
- public void testOpenExistingStateFile() throws TmfTraceException {
- ITmfStateSystem ssb2;
+ public void testOpenExistingStateFile() {
+ try {
+ /* 'newStateFile' should have already been created */
+ ITmfStateSystem ssb2 = StateSystemManager.loadStateHistory(stateFile, null, true);
- /* 'newStateFile' should have already been created */
- ssb2 = StateSystemManager.loadStateHistory(stateFile, null, true);
+ assertNotNull(ssb2);
+ assertEquals(startTime, ssb2.getStartTime());
+ assertEquals(endTime, ssb2.getCurrentEndTime());
- assertNotNull(ssb2);
-
assertEquals(startTime, ssb2.getStartTime()
);
- assertEquals(endTime, ssb2.getCurrentEndTime());
+ } catch (TmfTraceException e) {
+
fail(
);
+ }
}
}
}
}
This page took
0.025025 seconds
and
5
git commands to generate.