final URL location = FileLocator.find(TmfCoreTestPlugin.getDefault().getBundle(), new Path(path), null);
final File test = new File(FileLocator.toFileURL(location).toURI());
fTrace = new TmfTraceStub(test.toURI().getPath(), BLOCK_SIZE);
- fTrace.indexTrace();
+ fTrace.indexTrace(true);
} catch (final TmfTraceException e) {
e.printStackTrace();
} catch (final URISyntaxException e) {
final URL location = FileLocator.find(TmfCoreTestPlugin.getDefault().getBundle(), new Path(DIRECTORY + File.separator + TEST_STREAM), null);
testfile = new File(FileLocator.toFileURL(location).toURI());
trace = new TmfTraceStub(testfile.toURI().getPath());
- trace.indexTrace();
+ trace.indexTrace(true);
} catch (final URISyntaxException e) {
fail("URISyntaxException");
} catch (final IOException e) {
final URL location = FileLocator.find(TmfCoreTestPlugin.getDefault().getBundle(), new Path(DIRECTORY + File.separator + TEST_STREAM), null);
testfile = new File(FileLocator.toFileURL(location).toURI());
trace = new TmfTraceStub(testfile.toURI().getPath(), 0);
- trace.indexTrace();
+ trace.indexTrace(true);
} catch (final URISyntaxException e) {
fail("URISyntaxException");
} catch (final IOException e) {
final URL location = FileLocator.find(TmfCoreTestPlugin.getDefault().getBundle(), new Path(DIRECTORY + File.separator + TEST_STREAM), null);
testfile = new File(FileLocator.toFileURL(location).toURI());
trace = new TmfTraceStub(testfile.toURI().getPath(), BLOCK_SIZE);
- trace.indexTrace();
+ trace.indexTrace(true);
} catch (final URISyntaxException e) {
fail("URISyntaxException");
} catch (final IOException e) {
final URL location = FileLocator.find(TmfCoreTestPlugin.getDefault().getBundle(), new Path(DIRECTORY + File.separator + TEST_STREAM), null);
testfile = new File(FileLocator.toFileURL(location).toURI());
trace = new TmfTraceStub(testfile.toURI().getPath(), BLOCK_SIZE, null);
- trace.indexTrace();
+ trace.indexTrace(true);
} catch (final URISyntaxException e) {
fail("URISyntaxException");
} catch (final IOException e) {
final URL location = FileLocator.find(TmfCoreTestPlugin.getDefault().getBundle(), new Path(DIRECTORY + File.separator + TEST_STREAM), null);
testfile = new File(FileLocator.toFileURL(location).toURI());
trace = new TmfTraceStub(testfile.toURI().getPath(), BLOCK_SIZE, interval);
- trace.indexTrace();
+ trace.indexTrace(true);
} catch (final URISyntaxException e) {
fail("URISyntaxException");
} catch (final IOException e) {
testfile = new File(FileLocator.toFileURL(location).toURI());
original = new TmfTraceStub(testfile.toURI().getPath(), BLOCK_SIZE, new TmfCheckpointIndexer(null));
trace = new TmfTraceStub(original);
- trace.indexTrace();
+ trace.indexTrace(true);
} catch (final URISyntaxException e) {
fail("URISyntaxException");
} catch (final IOException e) {
// InitTrace and wait for indexing completion...
trace.initTrace(null, testfile.toURI().getPath(), ITmfEvent.class);
- trace.indexTrace();
+ trace.indexTrace(true);
int nbSecs = 0;
while (trace.getNbEvents() < NB_EVENTS && nbSecs < 10) {
Thread.sleep(1000);
@Test
public void testSetTimeRange() throws TmfTraceException {
final TmfTraceStub trace = new TmfTraceStub(fTrace);
- trace.indexTrace();
+ trace.indexTrace(true);
assertEquals("getRange-start", 1, trace.getTimeRange().getStartTime().getValue());
assertEquals("getRange-end", NB_EVENTS, trace.getTimeRange().getEndTime().getValue());
@Test
public void testSetStartTime() throws TmfTraceException {
final TmfTraceStub trace = new TmfTraceStub(fTrace);
- trace.indexTrace();
+ trace.indexTrace(true);
assertEquals("getRange-start", 1, trace.getTimeRange().getStartTime().getValue());
assertEquals("getRange-end", NB_EVENTS, trace.getTimeRange().getEndTime().getValue());
@Test
public void testSetEndTime() throws TmfTraceException {
final TmfTraceStub trace = new TmfTraceStub(fTrace);
- trace.indexTrace();
+ trace.indexTrace(true);
assertEquals("getRange-start", 1, trace.getTimeRange().getStartTime().getValue());
assertEquals("getRange-end", NB_EVENTS, trace.getTimeRange().getEndTime().getValue());
@Test
public void testSetNbEvents() throws TmfTraceException {
final TmfTraceStub trace = new TmfTraceStub(fTrace);
- trace.indexTrace();
+ trace.indexTrace(true);
assertEquals("getNbEvents", NB_EVENTS, trace.getNbEvents());
assertEquals("getCurrentTime", TmfTimestamp.ZERO, trace.getCurrentTime());
assertEquals("getCurrentRange", TmfTimeRange.NULL_RANGE, trace.getCurrentRange());
trace.setInitialRangeOffset(new TmfTimestamp(5, ITmfTimestamp.MILLISECOND_SCALE));
- trace.indexTrace();
+ trace.indexTrace(true);
} catch (final URISyntaxException e) {
fail("URISyntaxException");
} catch (final IOException e) {