[jbosstools-commits] JBoss Tools SVN: r41108 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Thu May 17 07:36:44 EDT 2012


Author: ljelinko
Date: 2012-05-17 07:36:43 -0400 (Thu, 17 May 2012)
New Revision: 41108

Modified:
   trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java
Log:
Added check if the server is already running and if not an exception is thrown. 

Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java	2012-05-17 11:35:42 UTC (rev 41107)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/view/ServersView.java	2012-05-17 11:36:43 UTC (rev 41108)
@@ -14,6 +14,7 @@
 import org.jboss.tools.ui.bot.ext.condition.TaskDuration;
 import org.jboss.tools.ui.bot.ext.gen.ActionItem.View.ServerServers;
 import org.jboss.tools.ui.bot.ext.helper.ContextMenuHelper;
+import org.jboss.tools.ui.bot.ext.logging.WidgetsLogger;
 import org.jboss.tools.ui.bot.ext.types.IDELabel;
 
 public class ServersView extends ViewBase {
@@ -152,6 +153,12 @@
 					log.error(ex);
 				}
 			}
+			try {
+				bot.shell("Server already running on localhost");
+				throw new RuntimeException("Another server is running on localhost");
+			} catch (WidgetNotFoundException e) {
+				// ok, nothing to do
+			}
 			util.waitForNonIgnoredJobs(Timing.time(600 * 1000));
 			util.waitForAll(Timing.time3S());
 		}



More information about the jbosstools-commits mailing list