X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=ctf%2Forg.eclipse.tracecompass.tmf.ctf.ui.swtbot.tests%2Fsrc%2Forg%2Feclipse%2Ftracecompass%2Ftmf%2Fctf%2Fui%2Fswtbot%2Ftests%2FSWTBotImportWizardUtils.java;fp=ctf%2Forg.eclipse.tracecompass.tmf.ctf.ui.swtbot.tests%2Fsrc%2Forg%2Feclipse%2Ftracecompass%2Ftmf%2Fctf%2Fui%2Fswtbot%2Ftests%2FSWTBotImportWizardUtils.java;h=4ce2e3dd096c2d5a59fcf5bfd8a38bbbb9f13735;hb=e4af2e9935d3cef9964a4476c88f1198e130cbcf;hp=4f571f8812c8e599995f30e14953eb8c0c53087f;hpb=1d310b28f6e909e9dab7444259d3752eb7e7d9c1;p=deliverable%2Ftracecompass.git diff --git a/ctf/org.eclipse.tracecompass.tmf.ctf.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/ctf/ui/swtbot/tests/SWTBotImportWizardUtils.java b/ctf/org.eclipse.tracecompass.tmf.ctf.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/ctf/ui/swtbot/tests/SWTBotImportWizardUtils.java index 4f571f8812..4ce2e3dd09 100644 --- a/ctf/org.eclipse.tracecompass.tmf.ctf.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/ctf/ui/swtbot/tests/SWTBotImportWizardUtils.java +++ b/ctf/org.eclipse.tracecompass.tmf.ctf.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/ctf/ui/swtbot/tests/SWTBotImportWizardUtils.java @@ -247,10 +247,10 @@ public final class SWTBotImportWizardUtils { return; } - SWTBotTable table = editor.bot().table(); bot.waitUntil(new DefaultCondition() { @Override public boolean test() throws Exception { + SWTBotTable table = editor.bot().table(); return table.rowCount() > 1; } @@ -259,17 +259,20 @@ public final class SWTBotImportWizardUtils { return "No items in table"; } }); + SWTBotTable table = editor.bot().table(); // Select first event (skip filter/search row) table.getTableItem(1).select(); editor.bot().waitUntil(new DefaultCondition() { @Override public boolean test() throws Exception { - boolean ret = table.selection().rowCount() == 1 && table.selection().get(0).toString().contains(firstEventStr); + // Get the table again since it can get re-created + SWTBotTable curTable = editor.bot().table(); + boolean ret = curTable.selection().rowCount() == 1 && curTable.selection().get(0).toString().contains(firstEventStr); if (!ret) { // FIXME: Not sure why, sometimes the first select() ends up // selecting an empty item. Retry selecting here. - table.getTableItem(1).select(); + curTable.getTableItem(1).select(); } return ret; }