[jboss-svn-commits] JBL Code SVN: r38001 - labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/main/java/com/arjuna/qa/extension.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Apr 11 23:53:17 EDT 2012
Author: zhfeng
Date: 2012-04-11 23:53:16 -0400 (Wed, 11 Apr 2012)
New Revision: 38001
Modified:
labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/main/java/com/arjuna/qa/extension/JBossAS7ServerKillProcessor.java
Log:
JBTM-1115 update to shutdown jboss when not killeed by byteman scripts
Modified: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/main/java/com/arjuna/qa/extension/JBossAS7ServerKillProcessor.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/main/java/com/arjuna/qa/extension/JBossAS7ServerKillProcessor.java 2012-04-11 16:21:03 UTC (rev 38000)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/main/java/com/arjuna/qa/extension/JBossAS7ServerKillProcessor.java 2012-04-12 03:53:16 UTC (rev 38001)
@@ -13,8 +13,9 @@
private final Logger log = Logger.getLogger(
JBossAS7ServerKillProcessor.class.getName());
private static String killSequence = "[jbossHome]/bin/jboss-cli.[suffix] --commands=connect,quit";
+ private static String shutdownSequence = "[jbossHome]/bin/jboss-cli.[suffix] --connect command=:shutdown";
private int checkDurableTime = 10;
- private int numofCheck = 120;
+ private int numofCheck = 60;
@Override
public void kill(Container container) throws Exception {
@@ -24,6 +25,7 @@
jbossHome = container.getContainerConfiguration().getContainerProperties().get("jbossHome");
}
killSequence = killSequence.replace("[jbossHome]", jbossHome);
+ shutdownSequence = shutdownSequence.replace("[jbossHome]", jbossHome);
String suffix;
String os = System.getProperty("os.name").toLowerCase();
@@ -33,6 +35,7 @@
suffix = "sh";
}
killSequence = killSequence.replace("[suffix]", suffix);
+ shutdownSequence = shutdownSequence.replace("[suffix]", suffix);
int checkn = 0;
boolean killed = false;
@@ -50,6 +53,10 @@
if(killed) {
log.info("jboss-as killed by byteman scirpt");
} else {
+ log.info("jboss-as not killed and will shutdown");
+ Process p = Runtime.getRuntime().exec(shutdownSequence);
+ p.waitFor();
+ p.destroy();
throw new RuntimeException("jboss-as not killed");
}
}
More information about the jboss-svn-commits
mailing list