[jboss-cvs] JBossAS SVN: r104628 - branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/scripts/support.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon May 10 15:48:31 EDT 2010
Author: rachmatowicz at jboss.com
Date: 2010-05-10 15:48:31 -0400 (Mon, 10 May 2010)
New Revision: 104628
Modified:
branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/scripts/support/AsyncShellScriptExecutor.java
Log:
Update checking of shutdownServer() parameters (JBPAPP-3309)
Modified: branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/scripts/support/AsyncShellScriptExecutor.java
===================================================================
--- branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/scripts/support/AsyncShellScriptExecutor.java 2010-05-10 19:42:33 UTC (rev 104627)
+++ branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/scripts/support/AsyncShellScriptExecutor.java 2010-05-10 19:48:31 UTC (rev 104628)
@@ -184,23 +184,16 @@
/* the command has not terminated, we need to kill it (somehow) */
if (!terminated) {
/* we are running a server instance via a shell */
- if (useShutdown) {
-
- if (getPathToShutdownSar() == null || getDeployDir() == null) {
- System.out.println("Skipping deployment of shutdown.sar: check that path to shutdown and deploy dir are set") ;
+ if (useShutdown) {
+ try {
+ // shutdownServer(getDeployURL("shutdown.sar").getPath(), getDeployDir()) ;
+ shutdownServer(getPathToShutdownSar(), getDeployDir()) ;
}
- else {
- try {
- // shutdownServer(getDeployURL("shutdown.sar").getPath(), getDeployDir()) ;
- shutdownServer(getPathToShutdownSar(), getDeployDir()) ;
- }
- catch(IOException e) {
- /* we have got to do something about this case... */
- /* short of getting the pid of the shell and sending a signal, I don't know */
- System.out.println("Critical error: can't shut down server: " + e.getMessage()) ;
- }
+ catch(IOException e) {
+ /* we have got to do something about this case... */
+ /* short of getting the pid of the shell and sending a signal, I don't know */
+ System.out.println("Critical error: can't shut down server: " + e.getMessage()) ;
}
-
}
/* now kill the shell process if it is still active */
try {
@@ -245,6 +238,10 @@
final int SHUTDOWN_DEPLOY_TIME = 5 ;
final int SHUTDOWN_UNDEPLOY_TIME = 10 ;
+ if (pathToShutdownSar == null || deployDir == null) {
+ throw new IOException("Skipping deployment of shutdown.sar: path to shutdown and deploy dir are not set") ;
+ }
+
/* first try to shutdown the server instance */
System.out.println("Shell command did not terminate - deploying shutdown.sar...") ;
String shutdownSource = null ;
More information about the jboss-cvs-commits
mailing list