[jbosstools-commits] JBoss Tools SVN: r39287 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext.
jbosstools-commits at lists.jboss.org
jbosstools-commits at lists.jboss.org
Mon Mar 5 11:15:23 EST 2012
Author: jgargula
Date: 2012-03-05 11:15:22 -0500 (Mon, 05 Mar 2012)
New Revision: 39287
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotExt.java
Log:
Fixed waiting for shell if it is disposed.
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotExt.java 2012-03-05 14:14:14 UTC (rev 39286)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTBotExt.java 2012-03-05 16:15:22 UTC (rev 39287)
@@ -244,8 +244,13 @@
for (int i = 0; i <= ATTEMPTS_TIMEOUT; i++) {
for (SWTBotShell shell : shells()) {
- if (shellTitle.equals(shell.getText())) {
- return shell;
+ try {
+ if (shellTitle.equals(shell.getText())) {
+ return shell;
+ }
+ } catch (WidgetNotFoundException wnfe) {
+ log.info("Waiting for shell: " + wnfe.getMessage());
+ // do nothing more but continue in loop
}
}
if (i < ATTEMPTS_TIMEOUT) {
More information about the jbosstools-commits
mailing list