Source:
public void testWithTrace() throws IOException, SecurityException, IllegalArgumentException { String tracePath; tracePath = FileLocator.toFileURL(CtfTestTrace.ARM_64_BIT_HEADER.getTraceURL()).getPath(); SWTWorkbenchBot bot = new SWTWorkbenchBot(); SWTBotView view = bot.viewById(VIEW_ID); view.close(); bot.waitUntil(ConditionHelpers.ViewIsClosed(view)); SWTBotUtils.createProject(PROJECT_NAME); SWTBotUtils.openTrace(PROJECT_NAME, tracePath, TRACE_TYPE); WaitUtils.waitForJobs(); createScatterViewer(); WaitUtils.waitForJobs(); final Chart scatterChart = fScatterChart; assertNotNull(scatterChart); bot.waitUntil(ConditionHelpers.numberOfSeries(scatterChart, 1)); SWTBotChart chartBot = new SWTBotChart(scatterChart); assertVisible(chartBot); assertEquals("", chartBot.getToolTipText()); Range range = scatterChart.getAxisSet().getXAxes()[0].getRange(); assertEquals(100000000, range.upper - range.lower, 0); ISeriesSet seriesSet = fScatterChart.getSeriesSet(); assertNotNull(seriesSet); ISeries[] series = seriesSet.getSeries(); assertNotNull(series); long noDataStart = 1412670961274443542L; long noDataEnd = 1412670961298823940L; TmfTimeRange windowRange = new TmfTimeRange(TmfTimestamp.fromNanos(noDataStart), TmfTimestamp.fromNanos(noDataEnd)); TmfSignalManager.dispatchSignal(new TmfWindowRangeUpdatedSignal(this, windowRange)); try { Thread.sleep(3000); } catch (InterruptedException e) { } range = scatterChart.getAxisSet().getXAxes()[0].getRange(); assertEquals(noDataEnd - noDataStart, range.upper - range.lower, 0); assertEquals(1, series.length); for (int i = 0; i < series.length; i++) { assertTrue(series[i] instanceof ILineSeries); } bot.closeAllEditors(); SWTBotUtils.deleteProject(PROJECT_NAME, bot); }

Target:
public void testWithTrace() throws IOException, SecurityException, IllegalArgumentException { String tracePath; tracePath = FileLocator.toFileURL(CtfTestTrace.ARM_64_BIT_HEADER.getTraceURL()).getPath(); SWTWorkbenchBot bot = new SWTWorkbenchBot(); SWTBotView view = bot.viewById(VIEW_ID); view.close(); bot.waitUntil(ConditionHelpers.ViewIsClosed(view)); SWTBotUtils.createProject(PROJECT_NAME); SWTBotUtils.openTrace(PROJECT_NAME, tracePath, TRACE_TYPE); WaitUtils.waitForJobs(); createScatterViewer(); WaitUtils.waitForJobs(); final Chart scatterChart = fScatterChart; assertNotNull(scatterChart); bot.waitUntil(ConditionHelpers.numberOfSeries(scatterChart, 1)); SWTBotChart chartBot = new SWTBotChart(scatterChart); assertVisible(chartBot); assertEquals("", chartBot.getToolTipText()); Range range = scatterChart.getAxisSet().getXAxes()[0].getRange(); assertEquals(100000000, range.upper - range.lower, 0); ISeriesSet seriesSet = fScatterChart.getSeriesSet(); assertNotNull(seriesSet); ISeries[] series = seriesSet.getSeries(); assertNotNull(series); long noDataStart = 1412670961274443542L; long noDataEnd = 1412670961298823940L; TmfTimeRange windowRange = new TmfTimeRange(TmfTimestamp.fromNanos(noDataStart), TmfTimestamp.fromNanos(noDataEnd)); TmfSignalManager.dispatchSignal(new TmfWindowRangeUpdatedSignal(this, windowRange)); bot.waitUntil(new SWTBotTestCondition() { @Override public boolean test() throws Exception { return windowRange.getStartTime().toNanos() == fSystemCallLatencyScatterView.getChartViewer().getWindowStartTime() && windowRange.getEndTime().toNanos() == fSystemCallLatencyScatterView.getChartViewer().getWindowEndTime(); } }); range = scatterChart.getAxisSet().getXAxes()[0].getRange(); assertEquals(noDataEnd - noDataStart, range.upper - range.lower, 0); assertEquals(1, series.length); for (int i = 0; i < series.length; i++) { assertTrue(series[i] instanceof ILineSeries); } bot.closeAllEditors(); SWTBotUtils.deleteProject(PROJECT_NAME, bot); }