import org.eclipse.tracecompass.tmf.ui.swtbot.tests.shared.SWTBotUtils;
import org.eclipse.tracecompass.tmf.ui.tests.shared.WaitUtils;
import org.eclipse.ui.IPageLayout;
+import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
fLogger.removeAllAppenders();
}
+ /**
+ * Test tear down method.
+ */
+ @After
+ public void afterTest() {
+ SWTBotUtils.closeSecondaryShells(fBot);
+ }
+
private static void test3_01Preparation() {
// FIXME: We can't use Manage Custom Parsers > Import because it uses a native dialog. We'll still check that they show up in the dialog
CustomTxtTraceDefinition[] txtDefinitions = CustomTxtTraceDefinition.loadAll(getPath("customParsers/ExampleCustomTxtParser.xml"));
// shell such the special "limbo shell" that Eclipse needs to work
Arrays.stream(shells)
.filter(shell -> shell != mainShell)
+ .filter(s -> !s.widget.isDisposed())
.filter(SWTBotShell::isVisible)
.peek(shell -> log.debug(MessageFormat.format("Closing lingering shell with title {0}", shell.getText())))
.forEach(SWTBotShell::close);