Author: ljelinko
Date: 2012-08-09 08:58:15 -0400 (Thu, 09 Aug 2012)
New Revision: 42950
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/ClearProjects.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RemoveServer.java
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StopServer.java
Log:
Perform requirement only if the server is actually present.
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/ClearProjects.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/ClearProjects.java 2012-08-09
12:56:38 UTC (rev 42949)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/ClearProjects.java 2012-08-09
12:58:15 UTC (rev 42950)
@@ -21,7 +21,9 @@
@Override
public void handle() {
- SWTTestExt.servers.removeAllProjectsFromServer();
+ if (SWTTestExt.servers.serverExists(SWTTestExt.configuredState.getServer().name)){
+ SWTTestExt.servers.removeAllProjectsFromServer();
+ }
SWTTestExt.projectExplorer.deleteAllProjects();
}
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RemoveServer.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RemoveServer.java 2012-08-09
12:56:38 UTC (rev 42949)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/RemoveServer.java 2012-08-09
12:58:15 UTC (rev 42950)
@@ -17,8 +17,10 @@
@Override
public void handle() {
if (!checkFulfilled()) {
- SWTTestExt.servers.deleteServer(SWTTestExt.configuredState.getServer().name);
- SWTTestExt.eclipse.removeServerRuntime(SWTTestExt.configuredState.getServer().name);
+ if (SWTTestExt.servers.serverExists(SWTTestExt.configuredState.getServer().name)){
+ SWTTestExt.servers.deleteServer(SWTTestExt.configuredState.getServer().name);
+ SWTTestExt.eclipse.removeServerRuntime(SWTTestExt.configuredState.getServer().name);
+ }
SWTTestExt.configuredState.getServer().isConfigured=false;
SWTTestExt.configuredState.getServer().name=null;
SWTTestExt.configuredState.getServer().version=null;
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StopServer.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StopServer.java 2012-08-09
12:56:38 UTC (rev 42949)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/config/requirement/StopServer.java 2012-08-09
12:58:15 UTC (rev 42950)
@@ -15,9 +15,11 @@
@Override
public void handle(){
- if (SWTTestExt.configuredState.getServer().isRunning){
- SWTTestExt.servers.stopServer(SWTTestExt.configuredState.getServer().name);
- SWTTestExt.configuredState.getServer().isRunning = false;
- }
+ if (SWTTestExt.configuredState.getServer().isRunning){
+ if (SWTTestExt.servers.serverExists(SWTTestExt.configuredState.getServer().name)){
+ SWTTestExt.servers.stopServer(SWTTestExt.configuredState.getServer().name);
+ }
+ SWTTestExt.configuredState.getServer().isRunning = false;
+ }
}
}
Show replies by date