Change-Id: I42704a18810e5b7899d24addbed9d17221289ac8
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/70887
Reviewed-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Tested-by: Alexandre Montplaisir <alexmonthy@efficios.com>
fail(e.getMessage());
}
}
+
+ /**
+ * Test inserting an interval before the start of the backend
+ */
+ @Test(expected = TimeRangeException.class)
+ public void testIntervalBeforeStart() {
+ long startTime = 1000;
+ try {
+ IStateHistoryBackend backend = getBackendForBuilding(startTime);
+ backend.insertPastState(startTime - 1, startTime + 1, 0, INT_VAL1);
+ } catch (IOException e) {
+ fail(e.getMessage());
+ }
+ }
+
}
import org.eclipse.tracecompass.internal.statesystem.core.backend.historytree.ThreadedHistoryTreeBackend;
import org.eclipse.tracecompass.statesystem.core.backend.IStateHistoryBackend;
+import org.junit.Test;
/**
* Test the {@link ThreadedHistoryTreeBackend} class.
fBackendMap.put(backend, historyTreeFile);
return backend;
}
+
+ @Override
+ @Test
+ public void testIntervalBeforeStart() {
+ // Exception is thrown in a thread, so we can't catch it
+ }
+
}