import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Path;
+import org.eclipse.tracecompass.internal.tmf.core.component.TmfProviderManager;
import org.eclipse.tracecompass.internal.tmf.core.trace.experiment.TmfExperimentContext;
import org.eclipse.tracecompass.internal.tmf.core.trace.experiment.TmfExperimentLocation;
import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule;
import org.eclipse.tracecompass.tmf.tests.stubs.analysis.TestExperimentAnalysis;
import org.eclipse.tracecompass.tmf.tests.stubs.trace.TmfExperimentStub;
import org.eclipse.tracecompass.tmf.tests.stubs.trace.TmfTraceStub;
+import org.junit.After;
import org.junit.Before;
import org.junit.Test;
setupExperiment();
}
+ @After
+ public void tearDown() {
+ if (fExperiment != null) {
+ fExperiment.dispose();
+ }
+ assertEquals(0, TmfProviderManager.getProviders(ITmfEvent.class).length);
+ }
+
// ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------
final TmfTimeRange timeRange = fExperiment.getTimeRange();
assertEquals("getStartTime", 1, timeRange.getStartTime().getValue());
assertEquals("getEndTime", NB_EVENTS, timeRange.getEndTime().getValue());
+
+ experiment.dispose();
}
// ------------------------------------------------------------------------
public void tearDown() {
fTrace.dispose();
fTrace = null;
+ assertEquals(0, TmfProviderManager.getProviders(ITmfEvent.class).length);
}
// ------------------------------------------------------------------------
assertEquals("getStartTime", 1, trace.getStartTime().getValue());
assertEquals("getEndTime", NB_EVENTS, trace.getEndTime().getValue());
+ trace.dispose();
} catch (final URISyntaxException e) {
fail("URISyntaxException");
} catch (final IOException e) {
assertEquals("getStartTime", 1, trace.getStartTime().getValue());
assertEquals("getEndTime", NB_EVENTS, trace.getEndTime().getValue());
+ trace.dispose();
} catch (final URISyntaxException e) {
fail("URISyntaxException");
} catch (final IOException e) {
assertEquals("getStartTime", 1, trace.getStartTime().getValue());
assertEquals("getEndTime", NB_EVENTS, trace.getEndTime().getValue());
+ original.dispose();
+ trace.dispose();
} catch (final URISyntaxException e) {
fail("URISyntaxException");
} catch (final IOException e) {
assertEquals("getRange-end", Long.MIN_VALUE, trace.getTimeRange().getEndTime().getValue());
assertEquals("getStartTime", Long.MIN_VALUE, trace.getStartTime().getValue());
assertEquals("getEndTime", Long.MIN_VALUE, trace.getEndTime().getValue());
+
+ trace.dispose();
}
@Test
assertEquals("getRange-end", Long.MIN_VALUE, trace.getTimeRange().getEndTime().getValue());
assertEquals("getStartTime", Long.MIN_VALUE, trace.getStartTime().getValue());
assertEquals("getEndTime", Long.MIN_VALUE, trace.getEndTime().getValue());
+
+ trace.dispose();
}
@Test
assertEquals("getRange-end", NB_EVENTS, trace.getTimeRange().getEndTime().getValue());
assertEquals("getStartTime", 1, trace.getStartTime().getValue());
assertEquals("getEndTime", NB_EVENTS, trace.getEndTime().getValue());
+
+ trace.dispose();
}
// ------------------------------------------------------------------------
TmfTimestamp initRange = new TmfTimestamp(5, ITmfTimestamp.MILLISECOND_SCALE);
assertEquals("getInitialRangeOffset", initRange, trace.getInitialRangeOffset());
+ trace.dispose();
} catch (final URISyntaxException e) {
fail("URISyntaxException");
} catch (final IOException e) {