[jboss-svn-commits] JBL Code SVN: r37942 - in labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar: crash-recovery-tests/src/main/java/com/arjuna/qa/extension and 3 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Mar 27 04:03:09 EDT 2012
Author: zhfeng
Date: 2012-03-27 04:03:07 -0400 (Tue, 27 Mar 2012)
New Revision: 37942
Added:
labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/tests/dd/beans.xml
labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/tests/dd/context-handlers.xml
Modified:
labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/pom.xml
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
labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/tests/
labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/tests/build.xml
Log:
JBTM-1069 update to work with jboss-as-7.1.1.Final
Modified: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/pom.xml
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/pom.xml 2012-03-27 04:45:28 UTC (rev 37941)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/pom.xml 2012-03-27 08:03:07 UTC (rev 37942)
@@ -92,13 +92,13 @@
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-arquillian-container-managed</artifactId>
- <version>7.1.0.Final</version>
+ <version>7.1.1.Final</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-controller-client</artifactId>
- <version>7.1.0.Final</version>
+ <version>7.1.1.Final</version>
<scope>test</scope>
</dependency>
</dependencies>
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-03-27 04:45:28 UTC (rev 37941)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/main/java/com/arjuna/qa/extension/JBossAS7ServerKillProcessor.java 2012-03-27 08:03:07 UTC (rev 37942)
@@ -12,7 +12,7 @@
public class JBossAS7ServerKillProcessor implements ServerKillProcessor {
private final Logger log = Logger.getLogger(
JBossAS7ServerKillProcessor.class.getName());
- private static String killSequence = "[jbossHome]/bin/jboss-admin.[suffix] --connect quit";
+ private static String killSequence = "[jbossHome]/bin/jboss-cli.[suffix] --commands=connect,quit";
private int checkDurableTime = 10;
private int numofCheck = 120;
@@ -56,10 +56,10 @@
private boolean checkJBossAlive() throws Exception {
Process p = Runtime.getRuntime().exec(killSequence);
-
p.waitFor();
+ int rc = p.exitValue();
- if (p.exitValue() != 0) {
+ if (rc != 0 && rc != 1) {
throw new RuntimeException("Kill Sequence failed");
}
@@ -69,4 +69,4 @@
return !(result != null && result.contains("The controller is not available"));
}
-}
\ No newline at end of file
+}
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-03-27 04:45:28 UTC (rev 37941)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/crash-recovery-tests/src/test/java/com/arjuna/qa/junit/BaseCrashTest.java 2012-03-27 08:03:07 UTC (rev 37942)
@@ -18,7 +18,7 @@
public class BaseCrashTest
{
protected String XTSServiceTest = " -Dorg.jboss.jbossts.xts.servicetests.XTSServiceTestName=@TestName@";
- protected String BytemanArgs = "-Djboss.modules.system.pkgs=org.jboss.byteman -Dorg.jboss.byteman.transform.all -javaagent:target/test-classes/lib/byteman.jar=script:target/test-classes/scripts/@BMScript at .txt,boot:target/test-classes/lib/byteman.jar,listener:true";
+ protected String BytemanArgs = "-Xms64m -Xmx512m -XX:MaxPermSize=256m -Djboss.modules.system.pkgs=org.jboss.byteman -Dorg.jboss.byteman.transform.all -javaagent:target/test-classes/lib/byteman.jar=script:target/test-classes/scripts/@BMScript at .txt,boot:target/test-classes/lib/byteman.jar,listener:true";
protected String javaVmArguments;
protected String testName;
protected String scriptName;
@@ -33,9 +33,9 @@
public static Archive<?> createTestArchive()
{
WebArchive archive = ShrinkWrap.
- createFromZipFile(WebArchive.class, new File(xtstestWar));
+ createFromZipFile(WebArchive.class, new File(xtstestWar));
final String ManifestMF = "Manifest-Version: 1.0\n"
- + "Dependencies: org.jboss.modules,deployment.arquillian-service,org.jboss.msc,org.jboss.jts,org.jboss.xts\n";
+ + "Dependencies: org.jboss.modules,deployment.arquillian-service,org.jboss.msc,org.jboss.jts,org.jboss.xts\n";
archive.setManifest(new StringAsset(ManifestMF));
return archive;
@@ -85,6 +85,14 @@
{
String log = "target/log";
+ String jbossHome = System.getenv().get("JBOSS_HOME");
+ if(jbossHome == null) {
+ Assert.fail("$JBOSS_HOME not set");
+ }
+ String dir = jbossHome + "/standalone/data/tx-object-store/ShadowNoFileLockStore/defaultStore/XTS/";
+ File objectStore = new File(dir);
+ Assert.assertTrue(checkTxObjectStore(objectStore));
+
if (testName != null && scriptName != null)
{
String logFileName = scriptName + "." + testName;
@@ -109,7 +117,7 @@
config.add("javaVmArguments", javaVmArguments + XTSServiceTest.replace("@TestName@", testClass));
controller.start("jboss-as", config.map());
- deployer.undeploy("xtstest");
+ //deployer.undeploy("xtstest");
deployer.deploy("xtstest");
//Waiting for crashing
@@ -131,7 +139,7 @@
controller.kill("jboss-as");
}
- private boolean deleteDirectory(File path)
+ private boolean deleteDirectory(File path)
{
if (path.exists())
{
@@ -150,4 +158,24 @@
}
return (path.delete());
}
+
+ private boolean checkTxObjectStore(File objectStore)
+ {
+ if(objectStore.exists() && objectStore.isDirectory())
+ {
+ File[] files = objectStore.listFiles();
+ if(files != null) {
+ int i = 0;
+ for(i=0;i<files.length;i++) {
+ if(files[i].isDirectory()) {
+ if (checkTxObjectStore(files[i]) == false)
+ return false;
+ } else {
+ return false;
+ }
+ }
+ }
+ }
+ return true;
+ }
}
Property changes on: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/tests
___________________________________________________________________
Added: svn:ignore
+ build
Modified: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/tests/build.xml
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/tests/build.xml 2012-03-27 04:45:28 UTC (rev 37941)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/tests/build.xml 2012-03-27 08:03:07 UTC (rev 37942)
@@ -88,15 +88,18 @@
</target>
<!-- build a war containing the compiled XTSTestService and the jboss-beans.xml -->
-
<target name="war" depends="compile,metainf">
<mkdir dir="${build.classes.dir}/org/jboss/jbossts/xts/servicetests/generated/wsdl/"/>
<copy toDir="${build.classes.dir}/org/jboss/jbossts/xts/servicetests/generated/wsdl/" file="${wsdl.dir}/xtsservicetests.wsdl"/>
+ <copy toDir="${build.classes.dir}/" file="${dd.dir}/context-handlers.xml"/>
<copy toDir="${build.classes.dir}/org/jboss/jbossts/xts/servicetests/service/" file="${dd.dir}/handlers.xml"/>
<copy toDir="${build.classes.dir}/org/jboss/jbossts/xts/servicetests/service/subordinate" file="${dd.dir}/subordinatehandlers.xml"/>
<war warfile="${build.webapps.dir}/xtstest.war" webxml="${web.inf.dir}/web.xml" manifest="${build.meta.inf.dir}/manifest.mf">
<classes dir="${build.classes.dir}" includes="**/*"/>
- <webinf dir="${dd.dir}" includes="wsdl/**"/>
+ <webinf dir="${dd.dir}">
+ <include name="wsdl/**"/>
+ <include name="beans.xml"/>
+ </webinf>
</war>
</target>
Added: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/tests/dd/beans.xml
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/tests/dd/beans.xml (rev 0)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/tests/dd/beans.xml 2012-03-27 08:03:07 UTC (rev 37942)
@@ -0,0 +1,18 @@
+ <!-- JBoss, Home of Professional Open Source Copyright 2009, Red Hat Middleware
+ LLC, and individual contributors as indicated by the @author tags. See the
+ copyright.txt in the distribution for a full listing of individual contributors.
+ This copyrighted material is made available to anyone wishing to use, modify,
+ copy, or redistribute it subject to the terms and conditions of the GNU Lesser
+ General Public License, v. 2.1. This program is distributed in the hope that
+ it will be useful, but WITHOUT A WARRANTY; without even the implied warranty
+ of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
+ General Public License for more details. You should have received a copy
+ of the GNU Lesser General Public License, v.2.1 along with this distribution;
+ if not, write to the Free Software Foundation, Inc., 51 Franklin Street,
+ Fifth Floor, Boston, MA 02110-1301, USA. (C) 2009 -->
+<!-- Marker file indicating CDI should be enabled -->
+<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+</beans>
\ No newline at end of file
Added: labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/tests/dd/context-handlers.xml
===================================================================
--- labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/tests/dd/context-handlers.xml (rev 0)
+++ labs/jbosstm/branches/JBOSSTS_4_16/XTS/sar/tests/dd/context-handlers.xml 2012-03-27 08:03:07 UTC (rev 37942)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+-->
+<handler-chains xmlns="http://java.sun.com/xml/ns/javaee"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xsi:schemaLocation="http://java.sun.com/xml/ns/javaee">
+ <handler-chain>
+ <handler>
+ <handler-name>ContextHandler</handler-name>
+ <handler-class>com.arjuna.mw.wst11.service.JaxWSHeaderContextProcessor</handler-class>
+ </handler>
+ </handler-chain>
+</handler-chains>
More information about the jboss-svn-commits
mailing list