[jboss-svn-commits] JBL Code SVN: r21433 - in labs/jbosstm/trunk: qa and 7 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Aug 11 10:49:35 EDT 2008


Author: jhalliday
Date: 2008-08-11 10:49:35 -0400 (Mon, 11 Aug 2008)
New Revision: 21433

Added:
   labs/jbosstm/trunk/qa/ext/fscontext.jar
   labs/jbosstm/trunk/qa/ext/jdom.jar
   labs/jbosstm/trunk/qa/ext/providerutil.jar
   labs/jbosstm/trunk/qa/run-dtf-local.xml
   labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/Utils/RegisterOTSServer2.java
   labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/Utils/SetupOTSServer2.java
Modified:
   labs/jbosstm/trunk/ext/TestingFramework.jar
   labs/jbosstm/trunk/qa/build.xml
   labs/jbosstm/trunk/qa/config/JBossTS_JTS_JacORB_QA.xml
   labs/jbosstm/trunk/qa/config/nodeconfig.xml
   labs/jbosstm/trunk/qa/testdefs/jbossts-qa-crashrecovery12-testdefs.xml
   labs/jbosstm/trunk/qa/testdefs/jbossts-qa-otsserver-testdefs.xml
   labs/jbosstm/trunk/qa/tests/build-jta.xml
   labs/jbosstm/trunk/qa/tests/build-jts.xml
   labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/ArjunaCore/Utils/BaseTestClient.java
   labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/CurrentTests01/Test36.java
Log:
Modified JBossTS qa to provide for running DTF tests without DTF server. DTF-4 and JBTM-390 


Modified: labs/jbosstm/trunk/ext/TestingFramework.jar
===================================================================
(Binary files differ)

Modified: labs/jbosstm/trunk/qa/build.xml
===================================================================
--- labs/jbosstm/trunk/qa/build.xml	2008-08-11 14:31:24 UTC (rev 21432)
+++ labs/jbosstm/trunk/qa/build.xml	2008-08-11 14:49:35 UTC (rev 21433)
@@ -21,7 +21,7 @@
 <project name="JBossTS QA Suite Distribution" default="dist">
 
 	<property environment="env"/>
-	<property name="driver.home" value="/home/mmusgrov/drivers"/>
+	<property name="driver.home" value="/home/jhalli/javastuff/dbdrivers"/>
 
 	<!-- set this property to the location of a JBossTS JTA/JTS build or installation -->
 	<property name="org.jboss.jbossts.qa.ts.home" location="../install"/>
@@ -65,36 +65,40 @@
 
 	<!-- you should not need to configure anything below here -->
 
-	<path id="database.drivers.path">
-		<fileset refid="oracle.drivers"/>
-		<fileset refid="mssql.drivers"/>
-		<fileset refid="pgsql.drivers"/>
-		<fileset refid="mysql.drivers"/>
-		<fileset refid="ibmdb2.drivers"/>
-		<fileset refid="sybase.drivers"/>
-	</path>
-
 	<property name="org.jboss.jbossts.qa.server_manager_location" location="ext/jboss-server-manager-0.1.1.GA.jar"/>
 	<property name="org.jboss.jbossts.qa.dist.buildroot" location="build"/>
 
-	<target name="buildtype">
+    <path id="database.drivers.path">
+        <fileset refid="oracle.drivers"/>
+        <fileset refid="mssql.drivers"/>
+        <fileset refid="pgsql.drivers"/>
+        <fileset refid="mysql.drivers"/>
+        <fileset refid="ibmdb2.drivers"/>
+        <fileset refid="sybase.drivers"/>
+    </path>
+
+    <target name="buildtype">
 		<available file="${jbossts.install.lib}/jbossjts.jar" property="buildtype" value="jts"/>
 		<available file="${jbossts.install.lib}/jts.jar" property="buildtype" value="jts"/>
 
-		<available file="${jbossts.install.lib}/jbossjta.jar" property="buildtype" value="jta"/>                        
+		<available file="${jbossts.install.lib}/jbossjta.jar" property="buildtype" value="jta"/>
 		<available file="${jbossts.install.lib}/jta.jar" property="buildtype" value="jta"/>
 
 		<available file="${jbossts.install.lib}/jbossjta-integration.jar" property="integration.build"/>
 		<available file="${jbossts.install.lib}/jbossjts-integration.jar" property="integration.build"/>
 
-		<condition property="dist.as">
+        <condition property="dist.as">
 			<and>
 				<isset property="integration.build"/>
 				<isset property="as"/>
 			</and>
 		</condition>
-	</target>
 
+        <fail unless="env.JBOSS_HOME" message="Please set the JBOSS_HOME environment variable" if="integration.build" />
+
+        <available file="${driver.home}" property="have.dbdrivers" value="true"/>
+    </target>
+
 	<target name="dist.as" depends="buildtype" if="dist.as">
 		<fail unless="env.JBOSS_HOME" message="Please set the JBOSS_HOME environment variable" />
 		<echo message="copying ${env.JBOSS_HOME} - this may take a while ..."/>
@@ -106,7 +110,8 @@
 
 	<target name="clean" depends="buildtype">
 		<delete dir="${org.jboss.jbossts.qa.dist.buildroot}"/>
-		<ant dir="tests" antfile="build-${buildtype}.xml" target="clean"/>
+
+        <ant dir="tests" antfile="build-${buildtype}.xml" target="clean"/>
 	</target>
 
 	<target name="init" depends="buildtype">
@@ -116,10 +121,10 @@
 
 	<target name="dist" depends="clean, init">
 
-		<!-- build the test suite -->
+        <!-- build the test suite -->
 		<ant dir="tests" antfile="build-${buildtype}.xml">
 			<reference refid="database.drivers.path"/>
-			<property name="org.jboss.jbossts.qa.server_manager_location"
+            <property name="org.jboss.jbossts.qa.server_manager_location"
 			          value="${org.jboss.jbossts.qa.server_manager_location}"/>
 		</ant>
 
@@ -140,14 +145,16 @@
 			<fileset file="tests/build/astest.jar"/>
 			<fileset file="tests/build/java.policy"/>
 			<fileset file="${org.jboss.jbossts.qa.server_manager_location}"/>
-			<fileset refid="oracle.drivers"/>
+        </copy>
+        <copy todir="${org.jboss.jbossts.qa.dist.buildroot}/qa/lib" failonerror="${have.dbdrivers}">
+            <fileset refid="oracle.drivers"/>
 			<fileset refid="mssql.drivers"/>
 			<fileset refid="pgsql.drivers"/>
 			<fileset refid="mysql.drivers"/>
 			<fileset refid="ibmdb2.drivers"/>
 			<fileset refid="sybase.drivers"/>
 		</copy>
-		<copy todir="${org.jboss.jbossts.qa.dist.buildroot}/qa">
+		<copy todir="${org.jboss.jbossts.qa.dist.buildroot}/qa" failonerror="false">
 			<fileset dir="tests/build/qa">
 				<include name="resources/**/*"/>
 			</fileset>
@@ -160,11 +167,20 @@
 			<fileset file="config/jboss${buildtype}-properties.xml"/>
 		</copy>
 
-		<!-- build the qa distribution installer package -->
+        <!-- for 'loca'l tests, we need some libs we would otherwise have got from DTF -->
+        <mkdir dir="${org.jboss.jbossts.qa.dist.buildroot}/qa/lib/ext"/>
+        <copy todir="${org.jboss.jbossts.qa.dist.buildroot}/qa/lib/ext" failonerror="false">
+            <fileset dir="ext">
+                <include name="fscontext.jar"/>
+                <include name="providerutil.jar"/>
+            </fileset>
+        </copy>
+
+        <!-- build the qa distribution installer package -->
 		<zip destfile="${org.jboss.jbossts.qa.dist.buildroot}/jbossts-${buildtype}-qa-distribution.zip"
 			basedir="${org.jboss.jbossts.qa.dist.buildroot}" excludes="jbossts-${buildtype}-qa-distribution.zip"/>
 
-	</target>
+    </target>
 
 	<target name="help">
 <echo>Supported targets:

Modified: labs/jbosstm/trunk/qa/config/JBossTS_JTS_JacORB_QA.xml
===================================================================
--- labs/jbosstm/trunk/qa/config/JBossTS_JTS_JacORB_QA.xml	2008-08-11 14:31:24 UTC (rev 21432)
+++ labs/jbosstm/trunk/qa/config/JBossTS_JTS_JacORB_QA.xml	2008-08-11 14:49:35 UTC (rev 21433)
@@ -23,21 +23,23 @@
 
 	<classpath-configurations>
 		<classpath name="main">
+
 			<jar name="$(PRODUCT.DIR)/lib/jbossjts.jar"/>
 			<jar name="$(PRODUCT.DIR)/lib/jbossjts-jacorb.jar"/>
-			<directory name="$(PRODUCT.DIR)/etc/"/>
-			<jar name="$(PRODUCT.DIR)/lib/ext/*.jar"/>
+            <directory name="$(PRODUCT.DIR)/etc/"/>
+
+            <jar name="$(PRODUCT.DIR)/lib/ext/*.jar"/>
 			<jar name="$(PRODUCT.DIR)/lib/ext/*.zip"/>
 
             <jar name="$(PRODUCT.DIR)/jacorb/etc/"/>
 			<jar name="$(PRODUCT.DIR)/qa/lib/*.jar"/>
 
 			<jar name="$(ORB_HOME)/lib/*.jar"/>
+            <directory name="$(ORB_HOME)/etc/"/>
 
-			<jar name="$(DTF_HOME)/lib/ext/fscontext.jar"/>
+            <jar name="$(DTF_HOME)/lib/ext/fscontext.jar"/>
 			<jar name="$(DTF_HOME)/lib/ext/providerutil.jar"/>
 
-
 			<!-- These are no longer required:
 			<jar name="$(ORB_HOME)/lib/avalon-framework-4.1.5.jar"/>
 			<jar name="$(ORB_HOME)/lib/logkit-1.2.jar"/>
@@ -52,7 +54,7 @@
 
 	<node-configurations>
 
-		<node-configuration os="Linux">
+        <node-configuration os="local">
 			<properties>
 				<property name="Context.INITIAL_CONTEXT_FACTORY" value="com.sun.jndi.fscontext.RefFSContextFactory"/>
 				<property name="jdbcprofilestore.dir" value="$(PRODUCT.DIR)/qa/jdbc_profiles"/>
@@ -61,6 +63,40 @@
 				<property name="performanceprofilestore.dir" value="$(PRODUCT.DIR)/qa/perf_profiles/"/>
 				<property name="com.arjuna.ats.jta.jtaTMImplementation"
 						  value="com.arjuna.ats.internal.jta.transaction.jts.TransactionManagerImple"/>
+
+                <!-- DONT set this one for local, we want the hardcoded default instead
+                    <property name="org.jboss.jbossts.qa.Utils.ServerIORStore.plugin"
+						  value="org.jboss.jbossts.qa.Utils.DistributedIORStorePlugin"/> -->
+
+                <property name="memorytestprofilestore.dir" value="$(PRODUCT.DIR)/qa/memory_profiles/"/>
+				<property name="org.jboss.jbossts.qa.Utils.nameserviceuri" value="//localhost:1099/NameService"/>
+			</properties>
+			<sets>
+                <set name="CALLS" value="1000"/>
+
+                <!-- use relative paths in the hope of location independence. Caution: if you run the ant script
+                     that invokes the local tests from a working dir other than qa, you likely to be eaten by a grue -->
+                <set name="DTF_HOME" value="build/qa"/>
+                <set name="ORB_HOME" value="build/jacorb"/>
+                <set name="PRODUCT.DIR" value="build"/>
+				<set name="ARJUNAJTS_HOME" value="build"/>
+
+			</sets>
+			<jvm id="1.5.0"/>
+			<default-classpath name="main"/>
+			<node-exclusions/>
+		</node-configuration>
+
+
+        <node-configuration os="Linux">
+			<properties>
+				<property name="Context.INITIAL_CONTEXT_FACTORY" value="com.sun.jndi.fscontext.RefFSContextFactory"/>
+				<property name="jdbcprofilestore.dir" value="$(PRODUCT.DIR)/qa/jdbc_profiles"/>
+				<property name="Context.PROVIDER_URL" value="file://$(PRODUCT.DIR)"/>
+				<property name="qa.debug" value="true"/>
+				<property name="performanceprofilestore.dir" value="$(PRODUCT.DIR)/qa/perf_profiles/"/>
+				<property name="com.arjuna.ats.jta.jtaTMImplementation"
+						  value="com.arjuna.ats.internal.jta.transaction.jts.TransactionManagerImple"/>
 				<!-- TODO fix me - pkg changes, both sides? -->
 				<property name="org.jboss.jbossts.qa.Utils.ServerIORStore.plugin"
 						  value="org.jboss.jbossts.qa.Utils.DistributedIORStorePlugin"/>

Modified: labs/jbosstm/trunk/qa/config/nodeconfig.xml
===================================================================
--- labs/jbosstm/trunk/qa/config/nodeconfig.xml	2008-08-11 14:31:24 UTC (rev 21432)
+++ labs/jbosstm/trunk/qa/config/nodeconfig.xml	2008-08-11 14:49:35 UTC (rev 21433)
@@ -20,7 +20,7 @@
   @author JBoss Inc.
 -->
 
-<test-node-configuration name="RATestNode" os="Linux">
+<test-node-configuration name="RATestNode" os="local">
 
 	<task-runner-definitions>
 

Added: labs/jbosstm/trunk/qa/ext/fscontext.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/trunk/qa/ext/fscontext.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/trunk/qa/ext/jdom.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/trunk/qa/ext/jdom.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/trunk/qa/ext/providerutil.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/trunk/qa/ext/providerutil.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/trunk/qa/run-dtf-local.xml
===================================================================
--- labs/jbosstm/trunk/qa/run-dtf-local.xml	                        (rev 0)
+++ labs/jbosstm/trunk/qa/run-dtf-local.xml	2008-08-11 14:49:35 UTC (rev 21433)
@@ -0,0 +1,146 @@
+<!--
+  JBoss, Home of Professional Open Source
+  Copyright 2008, 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) 2008,
+  @author JBoss Inc.
+-->
+
+<!--
+  Ant build script for running DTF tests locally using the new lightweight test runner (JIRA DTF-4).
+  Does not need tomcat, mysql or any DTF server processes running.
+
+  For JBossTS JTS builds.
+
+  1) Run the top level JBossTS ant build:  ant jts
+  2) Run the qa build:  cd qa; ant
+  2) Run the tests:  ant -f run-dtf-local.xml
+
+  Paths are relative to the JVM's working dir - don't expect to be able to execure this from anywhere but 'qa'.
+
+-->
+<project name="Local DTF Test for JBossTS" default="junit" basedir=".">
+
+    <property name="working.dir" location="build"/>
+
+	<path id="tests.classpath">
+        <pathelement location="${working.dir}/qa/lib/TestingFramework.jar"/>
+        <pathelement location="${working.dir}/lib/ext/junit.jar"/>
+        <pathelement location="ext/jdom.jar"/>
+    </path>
+
+    <target name="junit">
+
+        <antcall target="junit-tests"><param name="tests" value="currenttests01"/></antcall>
+        <antcall target="junit-tests"><param name="tests" value="jtatests01"/></antcall>
+        <antcall target="junit-tests"><param name="tests" value="otsserver"/></antcall>
+
+        <antcall target="junit-tests"><param name="tests" value="rawresources01_1"/></antcall>
+        <antcall target="junit-tests"><param name="tests" value="rawresources01_2"/></antcall>
+        <antcall target="junit-tests"><param name="tests" value="rawresources01_3"/></antcall>
+        <antcall target="junit-tests"><param name="tests" value="rawresources02_1"/></antcall>
+        <antcall target="junit-tests"><param name="tests" value="rawresources02_2"/></antcall>
+        <antcall target="junit-tests"><param name="tests" value="rawresources02_3"/></antcall>
+
+        <antcall target="junit-tests"><param name="tests" value="rawsubtransactionawareresources01_1"/></antcall>
+        <antcall target="junit-tests"><param name="tests" value="rawsubtransactionawareresources01_2"/></antcall>
+        <antcall target="junit-tests"><param name="tests" value="rawsubtransactionawareresources01_3"/></antcall>
+        <antcall target="junit-tests"><param name="tests" value="rawsubtransactionawareresources02_1"/></antcall>
+        <antcall target="junit-tests"><param name="tests" value="rawsubtransactionawareresources02_2"/></antcall>
+        <antcall target="junit-tests"><param name="tests" value="rawsubtransactionawareresources02_3"/></antcall>
+
+        <antcall target="junit-tests"><param name="tests" value="crashrecovery01"/></antcall>
+        <antcall target="junit-tests"><param name="tests" value="crashrecovery02_1"/></antcall>
+        <!-- <antcall target="junit-tests"><param name="tests" value="crashrecovery02_2"/></antcall> -->
+        <antcall target="junit-tests"><param name="tests" value="crashrecovery03"/></antcall>
+        <antcall target="junit-tests"><param name="tests" value="crashrecovery04"/></antcall>
+        <antcall target="junit-tests"><param name="tests" value="crashrecovery05_1"/></antcall>
+        <!-- <antcall target="junit-tests"><param name="tests" value="crashrecovery05_2"/></antcall> -->
+        <antcall target="junit-tests"><param name="tests" value="crashrecovery06"/></antcall>
+        <antcall target="junit-tests"><param name="tests" value="crashrecovery07"/></antcall>
+        <!-- <antcall target="junit-tests"><param name="tests" value="crashrecovery08"/></antcall> -->
+        <antcall target="junit-tests"><param name="tests" value="crashrecovery12"/></antcall>
+
+    </target>
+
+    <target name="junit-tests">
+
+        <echo message="Running test group ${tests} from basedir=${basedir}"/>
+
+
+        <!-- this runs forked because the product config file it uses has relative paths in it, so we need to guarantee
+            the working dir is the same as the location of this script. -->
+        <junit printsummary="yes" haltonfailure="yes" fork="true" dir="${basedir}">
+            <classpath>
+                <path refid="tests.classpath"/>
+            </classpath>
+
+            <formatter type="plain"/>
+
+            <sysproperty key="testdefsFile" value="${basedir}/testdefs/jbossts-qa-${tests}-testdefs.xml"/>
+            <sysproperty key="productConfigFile" value="${basedir}/config/JBossTS_JTS_JacORB_QA.xml"/>
+            <sysproperty key="testnodeConfigFile" value="${basedir}/config/nodeconfig.xml"/>
+            <sysproperty key="testnamePattern" value=".*"/>
+
+            <test name="org.jboss.dtf.testframework.local.JUnitTestSuite" outfile="jbossts-qa-${tests}-output"/>
+
+        </junit>
+
+        <echo message="Done test group ${tests}"/>
+    </target>
+
+
+<!--
+    unused examples of other approaches to running tests:
+
+    <target name="run2">
+        <java classname="org.jboss.dtf.testframework.local.JUnitTestSuite" fork="true">
+            <classpath>
+                <path refid="tests.classpath"/>
+            </classpath>
+
+            <arg value="./testdefs/jbossts-qa-otsserver-testdefs.xml"/>
+            <arg value="config/JBossTS_JTS_JacORB_QA.xml"/>
+            <arg value="config/nodeconfig.xml"/>
+            <arg value="OTSServer_Test001"/>
+
+            <jvmarg value="-Xdebug"/>
+            <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"/>
+
+        </java>
+    </target>
+
+    <target name="run">
+        <antcall target="run-tests"><param name="testdefs.filename" value="jbossts-qa-txcore-testdefs.xml"/></antcall>
+    </target>
+
+    <target name="run-tests">
+        <java classname="org.jboss.dtf.testframework.local.LocalTestManager" fork="true">
+            <classpath>
+                <path refid="tests.classpath"/>
+                <pathelement location="/usr/local/javastuff/jdom-1.1/lib/xerces.jar"/>
+            </classpath>
+            <arg value="file:///home/jhalli/IdeaProjects/jboss/jbossts_trunk/qa/testdefs/${testdefs.filename}"/>
+            <arg value="/home/jhalli/IdeaProjects/jboss/jbossts_trunk/qa/config/JBossTS_JTS_JacORB_QA.xml"/>
+            <arg value="file:///home/jhalli/IdeaProjects/jboss/jbossts_trunk/qa/config/nodeconfig.xml"/>
+
+            <jvmarg value="-Xdebug"/>
+            <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"/>
+
+        </java>
+    </target>
+-->
+</project>

Modified: labs/jbosstm/trunk/qa/testdefs/jbossts-qa-crashrecovery12-testdefs.xml
===================================================================
--- labs/jbosstm/trunk/qa/testdefs/jbossts-qa-crashrecovery12-testdefs.xml	2008-08-11 14:31:24 UTC (rev 21432)
+++ labs/jbosstm/trunk/qa/testdefs/jbossts-qa-crashrecovery12-testdefs.xml	2008-08-11 14:49:35 UTC (rev 21433)
@@ -95,7 +95,8 @@
 				</start_task>
 				<wait_for_task runtime_id="outcome0"/>
 				<terminate_task runtime_id="server0"/>
-			</action_list>
+                <terminate_task runtime_id="client0"/>
+            </action_list>
 		</test_declaration>
 
 		<test_declaration id="CrashRecovery12_Test03" descriptive_name="CrashRecovery12 Test03" author="JDC">
@@ -125,6 +126,7 @@
 				</start_task>
 				<wait_for_task runtime_id="outcome0"/>
 				<terminate_task runtime_id="server0"/>
+                <terminate_task runtime_id="client0"/>
 			</action_list>
 		</test_declaration>
 
@@ -155,6 +157,7 @@
 				</start_task>
 				<wait_for_task runtime_id="outcome0"/>
 				<terminate_task runtime_id="server0"/>
+                <terminate_task runtime_id="client0"/>
 			</action_list>
 		</test_declaration>
 

Modified: labs/jbosstm/trunk/qa/testdefs/jbossts-qa-otsserver-testdefs.xml
===================================================================
--- labs/jbosstm/trunk/qa/testdefs/jbossts-qa-otsserver-testdefs.xml	2008-08-11 14:31:24 UTC (rev 21432)
+++ labs/jbosstm/trunk/qa/testdefs/jbossts-qa-otsserver-testdefs.xml	2008-08-11 14:49:35 UTC (rev 21433)
@@ -25,14 +25,21 @@
 
 	<test_group name="OTSServer">
 		<task_declaration>
-
+<!--
 			<task id="org.jboss.jbossts.qa.Utils.RegisterOTSServer" classname="org.jboss.jbossts.qa.Utils.RegisterOTSServer"
 				  runner="UnitTestRunner" type="expect_ready"/>
 
 			<task id="org.jboss.jbossts.qa.Utils.SetupOTSServer" classname="org.jboss.jbossts.qa.Utils.SetupOTSServer"
 				  runner="UnitTestRunner" type="expect_ready"/>
+-->
+			<task id="org.jboss.jbossts.qa.Utils.RegisterOTSServer" classname="org.jboss.jbossts.qa.Utils.RegisterOTSServer2"
+				  runner="JavaTaskRunner" type="expect_ready"/>
 
-			<task id="com.arjuna.ats.arjuna.recovery.RecoveryManager"
+			<task id="org.jboss.jbossts.qa.Utils.SetupOTSServer" classname="org.jboss.jbossts.qa.Utils.SetupOTSServer2"
+				  runner="JavaTaskRunner" type="expect_ready"/>
+-->
+
+            <task id="com.arjuna.ats.arjuna.recovery.RecoveryManager"
 				  classname="com.arjuna.ats.arjuna.recovery.RecoveryManager" runner="JavaTaskRunner"
 				  type="expect_ready"/>
 

Modified: labs/jbosstm/trunk/qa/tests/build-jta.xml
===================================================================
--- labs/jbosstm/trunk/qa/tests/build-jta.xml	2008-08-11 14:31:24 UTC (rev 21432)
+++ labs/jbosstm/trunk/qa/tests/build-jta.xml	2008-08-11 14:49:35 UTC (rev 21433)
@@ -25,12 +25,15 @@
 
 	<!-- set properties for AS testing -->
 	<property environment="env"/>
-	<property name="jbossall-client.location" location="${env.JBOSS_HOME}/client/jbossall-client.jar"/>
-    
-	<!-- set this property to the location of a DTF TestingFramework build -->
+
+    <property name="jbossall-client.location" location="${env.JBOSS_HOME}/client/jbossall-client.jar"/>
+    <property name="astest.dir" value="org/jboss/jbossts/qa/astests"/>
+
+    <!-- set this property to the location of a DTF TestingFramework build -->
 	<property name="org.jboss.jbossts.qa.testingframework_location" location="../../ext/TestingFramework.jar"/>
 
-	<!-- set this to the location(s) of the database drivers -->
+
+    <!-- set this to the location(s) of the database drivers -->
 	<path id="database.drivers.path">
 		<fileset dir="/oracle/product/10.2.0/db_1/jdbc/lib/">
 			<include name="ojdbc14.jar"/>
@@ -61,7 +64,6 @@
 			<include name="jta-1_1-classes.zip"/>
 		</fileset>
 		<fileset file="${org.jboss.jbossts.qa.server_manager_location}" />
-		<fileset file="${jbossall-client.location}" />
 	</path>
 
 	<target name="org.jboss.jbossts.qa.init">
@@ -71,10 +73,11 @@
 
 	<target name="org.jboss.jbossts.qa.clean">
 		<delete dir="${org.jboss.jbossts.qa.buildroot}"/>
-	</target>
+    </target>
 
 	<target name="org.jboss.jbossts.qa.compile" depends="org.jboss.jbossts.qa.clean, org.jboss.jbossts.qa.init">
-		<javac srcdir="${org.jboss.jbossts.qa.src}"
+
+        <javac srcdir="${org.jboss.jbossts.qa.src}"
 			   destdir="${org.jboss.jbossts.qa.build.classes}"
 			   debug="on"
 			   excludes="org/jboss/jbossts/qa/ArjunaCore/Common/ClassPathParserTest.java">
@@ -88,20 +91,48 @@
 			<include name="**/org/jboss/jbossts/qa/JTA01Tests/*.java"/>
 			<include name="**/org/jboss/jbossts/qa/astests/**/*.java"/>
 
-			<classpath>
+            <exclude name="**/astests/**"/>
+            <exclude name="**/JNDIManager.java"/>
+
+            <classpath>
 				<path refid="jta.classpath"/>
-				<path refid="database.drivers.path"/>
 				<pathelement location="${org.jboss.jbossts.qa.build.classes}"/>
 				<pathelement location="${org.jboss.jbossts.qa.testingframework_location}"/>
 			</classpath>
-
 		</javac>
+    </target>
 
-	</target>
+    <target name="jdbc-compile" depends="org.jboss.jbossts.qa.clean, org.jboss.jbossts.qa.init" if="have.dbdrivers">
+        <javac srcdir="${org.jboss.jbossts.qa.src}"
+               destdir="${org.jboss.jbossts.qa.build.classes}"
+               debug="on" includes="**/JNDIManager.java">
 
-   <property name="astest.dir" value="org/jboss/jbossts/qa/astests"/>
+            <classpath>
+                <path refid="jta.classpath"/>
+                <pathelement location="${org.jboss.jbossts.qa.build.classes}"/>
+                <pathelement location="${org.jboss.jbossts.qa.testingframework_location}"/>
+                <!-- additional dependency, which is why we don't just do this in compile task above: -->
+                <path refid="database.drivers.path"/>
+            </classpath>
+        </javac>
+    </target>
 
-   <target name="as-ejbjar">
+    <target name="astests-compile" depends="org.jboss.jbossts.qa.clean, org.jboss.jbossts.qa.init" if="integration.build">
+        <javac srcdir="${org.jboss.jbossts.qa.src}"
+               destdir="${org.jboss.jbossts.qa.build.classes}"
+               debug="on" includes="**/astests/**">
+
+            <classpath>
+                <path refid="jta.classpath"/>
+                <pathelement location="${org.jboss.jbossts.qa.build.classes}"/>
+                <pathelement location="${org.jboss.jbossts.qa.testingframework_location}"/>
+                <!-- additional dependency, which is why we don't just do this in compile task above: -->
+                <pathelement location="${jbossall-client.location}"/>
+            </classpath>
+        </javac>
+    </target>
+
+   <target name="as-ejbjar" depends="astests-compile" if="integration.build">
       <jar jarfile="${org.jboss.jbossts.qa.buildroot}/astest.jar">
          <fileset dir="${org.jboss.jbossts.qa.build.classes}">
             <include name="${astest.dir}/**/*.class"/>
@@ -118,8 +149,8 @@
       </copy>
    </target>
 
-	<target name="org.jboss.jbossts.qa.jar" depends="org.jboss.jbossts.qa.compile, as-ejbjar">
-		<jar jarfile="${org.jboss.jbossts.qa.buildroot}/jbossts-jta-qa.jar"
+	<target name="org.jboss.jbossts.qa.jar" depends="org.jboss.jbossts.qa.compile, jdbc-compile, as-ejbjar">
+        <jar jarfile="${org.jboss.jbossts.qa.buildroot}/jbossts-jta-qa.jar"
 			 basedir="${org.jboss.jbossts.qa.build.classes}"/>
 	</target>
 

Modified: labs/jbosstm/trunk/qa/tests/build-jts.xml
===================================================================
--- labs/jbosstm/trunk/qa/tests/build-jts.xml	2008-08-11 14:31:24 UTC (rev 21432)
+++ labs/jbosstm/trunk/qa/tests/build-jts.xml	2008-08-11 14:49:35 UTC (rev 21433)
@@ -28,7 +28,7 @@
 	<property name="jboss.home" value="${env.JBOSS_HOME}"/>
 	<property name="jbossall-client.location" location="${jboss.home}/client/jbossall-client.jar"/>
 	<property name="astest.dir" value="org/jboss/jbossts/qa/astests"/>
-    
+
     <!-- set this property to the location of a DTF TestingFramework build -->
 	<property name="org.jboss.jbossts.qa.testingframework_location" location="../../ext/TestingFramework.jar"/>
 
@@ -77,7 +77,6 @@
 			<include name="orbportability-ant.jar"/>
 		</fileset>
 		<fileset file="${org.jboss.jbossts.qa.server_manager_location}" />
-		<fileset file="${jbossall-client.location}" /> 
         <pathelement path="${org.jboss.jbossts.qa.orb.classpath}"/>
 	</path>
 
@@ -246,20 +245,35 @@
 			   debug="on" deprecation="on">
 
 			<exclude name="org/jboss/jbossts/qa/ArjunaCore/Common/ClassPathParserTest.java" />
+
 			<exclude name="**/${astest.dir}/**/*.java" />
+            <exclude name="**/JNDIManager.java"/>
 
+            <classpath>
+				<path refid="jts.classpath"/>
+				<pathelement location="${org.jboss.jbossts.qa.build.classes}"/>
+				<pathelement location="${org.jboss.jbossts.qa.testingframework_location}"/>
+			</classpath>
+		</javac>
+	</target>
+
+    <target name="jdbc-compile" depends="org.jboss.jbossts.qa.clean, org.jboss.jbossts.qa.init" if="have.dbdrivers">
+		<javac srcdir="${org.jboss.jbossts.qa.src}"
+			   destdir="${org.jboss.jbossts.qa.build.classes}"
+			   debug="on" deprecation="on" includes="**/JNDIManager.java">
+
 			<classpath>
 				<path refid="jts.classpath"/>
-				<path refid="database.drivers.path"/>
 				<pathelement location="${org.jboss.jbossts.qa.build.classes}"/>
 				<pathelement location="${org.jboss.jbossts.qa.testingframework_location}"/>
+
+                <path refid="database.drivers.path"/>
 			</classpath>
-
 		</javac>
-
 	</target>
 
-	<path id="as.classpath">
+
+    <path id="as.classpath">
                 <fileset dir="${org.jboss.jbossts.qa.ts.home}/lib/">
                         <include name="jbossjts.jar"/>
                 </fileset>
@@ -275,7 +289,7 @@
                 </fileset>
 	</path>
 
-    <target name="as-ejbjar.compile" >
+    <target name="as-ejbjar.compile" if="integration.build">
         <javac srcdir="${org.jboss.jbossts.qa.src}"
                destdir="${org.jboss.jbossts.qa.build.classes}"
                debug="on" deprecation="on">
@@ -286,7 +300,7 @@
         </javac>
     </target>
 
-   <target name="as-ejbjar" depends="as-ejbjar.compile" >
+   <target name="as-ejbjar" depends="as-ejbjar.compile" if="integration.build">
       <jar jarfile="${org.jboss.jbossts.qa.buildroot}/astest.jar">
          <fileset dir="${org.jboss.jbossts.qa.build.classes}">
             <include name="${astest.dir}/**/*.class"/>
@@ -303,7 +317,7 @@
       </copy>
    </target>
 
-	<target name="org.jboss.jbossts.qa.jar" depends="org.jboss.jbossts.qa.compile, as-ejbjar">
+	<target name="org.jboss.jbossts.qa.jar" depends="org.jboss.jbossts.qa.compile, jdbc-compile, as-ejbjar">
 		<jar jarfile="${org.jboss.jbossts.qa.buildroot}/jbossts-jts-qa.jar"
 			 basedir="${org.jboss.jbossts.qa.build.classes}"/>
 	</target>

Modified: labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/ArjunaCore/Utils/BaseTestClient.java
===================================================================
--- labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/ArjunaCore/Utils/BaseTestClient.java	2008-08-11 14:31:24 UTC (rev 21432)
+++ labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/ArjunaCore/Utils/BaseTestClient.java	2008-08-11 14:49:35 UTC (rev 21433)
@@ -139,11 +139,13 @@
 	public void getFirstReading()
 	{
 		clientMemory0 = (int) JVMStats.getMemory();
-	}
+        System.out.println("clientMemory0: "+clientMemory0);
+    }
 
 	public void getSecondReading()
 	{
 		clientMemory1 = (int) JVMStats.getMemory();
+        System.out.println("clientMemory1: "+clientMemory1);
 	}
 
 	public void qaMemoryAssert()

Modified: labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/CurrentTests01/Test36.java
===================================================================
--- labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/CurrentTests01/Test36.java	2008-08-11 14:31:24 UTC (rev 21432)
+++ labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/CurrentTests01/Test36.java	2008-08-11 14:49:35 UTC (rev 21433)
@@ -87,21 +87,19 @@
 			{
 			}
 
-			if (correct)
+			if (!correct)
 			{
-				System.out.println("Passed");
-			}
-			else
-			{
 				System.out.println("Failed");
-			}
+                return;
+            }
 		}
 		catch (Exception exception)
 		{
 			System.out.println("Failed");
 			System.err.println("Test036.main: " + exception);
 			exception.printStackTrace(System.err);
-		}
+            return;
+        }
 
 		try
 		{

Copied: labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/Utils/RegisterOTSServer2.java (from rev 21189, labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/Utils/RegisterOTSServer.java)
===================================================================
--- labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/Utils/RegisterOTSServer2.java	                        (rev 0)
+++ labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/Utils/RegisterOTSServer2.java	2008-08-11 14:49:35 UTC (rev 21433)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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) 2005-2006,
+ * @author JBoss Inc.
+ */
+package org.jboss.jbossts.qa.Utils;
+
+import org.jboss.dtf.testframework.unittest.Test;
+import org.omg.CosTransactions.TransactionFactory;
+import org.omg.CosTransactions.TransactionFactoryHelper;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+
+/*
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
+ *
+ * Arjuna Technology Ltd.
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: RegisterOTSServer.java,v 1.2 2003/06/26 11:45:07 rbegg Exp $
+ */
+
+public class RegisterOTSServer2
+{
+	public final static String NAME_SERVICE_BIND_NAME_PROPERTY = "ots.server.bindname";
+
+	public static void main(String[] args)
+	{
+		String bindName = System.getProperty(NAME_SERVICE_BIND_NAME_PROPERTY);
+
+		if (bindName != null)
+		{
+			System.out.println("Registering OTS Server '" + bindName + "'");
+
+			try
+			{
+				ORBInterface.initORB(args, null);
+
+				String[] transactionFactoryParams = new String[1];
+				transactionFactoryParams[0] = ORBServices.otsKind;
+
+				TransactionFactory transactionFactory = TransactionFactoryHelper.narrow(ORBServices.getService(ORBServices.transactionService, transactionFactoryParams));
+
+				registerService(bindName, ORBInterface.orb().object_to_string(transactionFactory));
+
+                System.out.println("Ready");
+            }
+			catch (Exception e)
+			{
+				e.printStackTrace(System.err);
+				System.out.println("Failed");
+			}
+		}
+		else
+		{
+			System.out.println("Bind name '" + NAME_SERVICE_BIND_NAME_PROPERTY + "' not specified");
+			System.out.println("Failed");
+		}
+	}
+
+    public static void registerService(String name, String ior) throws IOException
+    {
+        FileOutputStream fout = new FileOutputStream(name);
+        fout.write(ior.getBytes());
+        fout.close();
+    }
+}
\ No newline at end of file

Copied: labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/Utils/SetupOTSServer2.java (from rev 21189, labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/Utils/SetupOTSServer.java)
===================================================================
--- labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/Utils/SetupOTSServer2.java	                        (rev 0)
+++ labs/jbosstm/trunk/qa/tests/src/org/jboss/jbossts/qa/Utils/SetupOTSServer2.java	2008-08-11 14:49:35 UTC (rev 21433)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, 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) 2005-2006,
+ * @author JBoss Inc.
+ */
+package org.jboss.jbossts.qa.Utils;
+
+import org.jboss.dtf.testframework.unittest.Test;
+import com.arjuna.orbportability.Services;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.io.FileInputStream;
+import java.io.IOException;
+
+/*
+ * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
+ *
+ * Arjuna Technology Ltd.
+ * Newcastle upon Tyne,
+ * Tyne and Wear,
+ * UK.
+ *
+ * $Id: SetupOTSServer.java,v 1.2 2003/06/26 11:45:07 rbegg Exp $
+ */
+
+public class SetupOTSServer2
+{
+	public static void main(String[] args)
+	{
+		String bindName = System.getProperty(RegisterOTSServer.NAME_SERVICE_BIND_NAME_PROPERTY);
+
+		if (bindName != null)
+		{
+			System.out.println("Looking up OTS Server '" + bindName + "'");
+
+			try
+			{
+				String transactionServiceIOR = getService(bindName);
+
+				ORBInterface.initORB(args, null);
+
+				String[] transactionFactoryParams = new String[1];
+				transactionFactoryParams[0] = ORBServices.otsKind;
+
+				Services services = new Services(ORBInterface.getORB());
+
+				services.registerService(ORBInterface.orb().string_to_object(transactionServiceIOR), ORBServices.transactionService, transactionFactoryParams);
+
+                System.out.println("Ready");
+			}
+			catch (Exception e)
+			{
+				e.printStackTrace(System.err);
+                System.out.println("Failed");
+			}
+		}
+		else
+		{
+			System.out.println("Bind name '" + RegisterOTSServer.NAME_SERVICE_BIND_NAME_PROPERTY + "' not specified");
+            System.out.println("Failed");
+		}
+	}
+
+    public static String getService(String name) throws IOException
+    {
+        BufferedReader fin = new BufferedReader(new InputStreamReader(new FileInputStream(name)));
+        String returnValue = fin.readLine();
+        fin.close();
+        return returnValue;
+    }
+}
\ No newline at end of file




More information about the jboss-svn-commits mailing list