[jboss-svn-commits] JBL Code SVN: r37982 - in labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src: test/java/com/arjuna/qa/junit and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Apr 4 22:09:07 EDT 2012


Author: zhfeng
Date: 2012-04-04 22:09:07 -0400 (Wed, 04 Apr 2012)
New Revision: 37982

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/test/java/com/arjuna/qa/junit/BaseCrashTest.java
Log:
JBTM-1085 update to close file stream and destroy process after running check command

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-05 01:34:23 UTC (rev 37981)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/main/java/com/arjuna/qa/extension/JBossAS7ServerKillProcessor.java	2012-04-05 02:09:07 UTC (rev 37982)
@@ -60,12 +60,15 @@
 		int rc = p.exitValue();
 
 		if (rc != 0 && rc != 1) {
+			p.destroy();
 			throw new RuntimeException("Kill Sequence failed");
 		}
 		
 		InputStream out = p.getInputStream();
 		BufferedReader in = new BufferedReader(new InputStreamReader(out));
 		String result= in.readLine();
+		out.close();
+		p.destroy();
 		
 		return !(result != null && result.contains("The controller is not available"));
 	}

Modified: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/BaseCrashTest.java
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/BaseCrashTest.java	2012-04-05 01:34:23 UTC (rev 37981)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/BaseCrashTest.java	2012-04-05 02:09:07 UTC (rev 37982)
@@ -128,8 +128,8 @@
         controller.start("jboss-as", config.map());
 
         //redeploy xtstest
-        deployer.undeploy("xtstest");
-        deployer.deploy("xtstest");
+        //deployer.undeploy("xtstest");
+        //deployer.deploy("xtstest");
 
         //Waiting for recovery
         //Thread.sleep(waitForRecovery * 60 * 1000);



More information about the jboss-svn-commits mailing list