[jboss-cvs] JBossAS SVN: r107210 - in projects/ejb3/components/nointerface/trunk/testsuite: src/test/resources and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Jul 29 12:20:04 EDT 2010
Author: jaikiran
Date: 2010-07-29 12:20:03 -0400 (Thu, 29 Jul 2010)
New Revision: 107210
Added:
projects/ejb3/components/nointerface/trunk/testsuite/src/test/resources/test.xml
Modified:
projects/ejb3/components/nointerface/trunk/testsuite/pom.xml
projects/ejb3/components/nointerface/trunk/testsuite/src/test/resources/log4j.xml
Log:
Fix the no-interface test infrastructure. It now works similar to singleton and timerservice testsuite and doesn't use maven surefire plugin for integration tests
Modified: projects/ejb3/components/nointerface/trunk/testsuite/pom.xml
===================================================================
--- projects/ejb3/components/nointerface/trunk/testsuite/pom.xml 2010-07-29 15:24:41 UTC (rev 107209)
+++ projects/ejb3/components/nointerface/trunk/testsuite/pom.xml 2010-07-29 16:20:03 UTC (rev 107210)
@@ -92,28 +92,15 @@
running the integration test, start the server and after
the tests, stop the server
-->
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <!-- skip unit test -->
- <skipTests>true</skipTests>
- <redirectTestOutputToFile>true</redirectTestOutputToFile>
- <printSummary>true</printSummary>
- </configuration>
- <executions>
- <execution>
- <id>integration-tests</id>
- <phase>integration-test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <!-- Override the earlier set value to now run integration tests -->
- <skipTests>false</skipTests>
- </configuration>
- </execution>
- </executions>
- </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <!-- skip unit test -->
+ <skipTests>true</skipTests>
+ <redirectTestOutputToFile>true</redirectTestOutputToFile>
+ <printSummary>true</printSummary>
+ </configuration>
+ </plugin>
<!--
Setup the package manager and no-interface package so
@@ -141,14 +128,52 @@
</artifactItem>
<!--
The no-interface package -->
- <artifactItem>
+ <artifactItem>
<groupId>org.jboss.ejb3.nointerface</groupId>
<artifactId>jboss-ejb3-nointerface-impl</artifactId>
<classifier>package</classifier>
<type>jar</type>
<outputDirectory>${project.build.directory}/dependencies/package</outputDirectory>
- </artifactItem>
+ </artifactItem>
+
+ <!-- Additional test infrastructure dependencies -->
+ <artifactItem>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <outputDirectory>${project.build.directory}/dependencies/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>ant-contrib</groupId>
+ <artifactId>ant-contrib</artifactId>
+ <outputDirectory>${project.build.directory}/dependencies/lib</outputDirectory>
+ </artifactItem>
+
+ <artifactItem>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-junit</artifactId>
+ <outputDirectory>${project.build.directory}/dependencies/lib</outputDirectory>
+ </artifactItem>
+
+ <artifactItem>
+ <groupId>org.jboss.shrinkwrap</groupId>
+ <artifactId>shrinkwrap-impl-base</artifactId>
+ <outputDirectory>${project.build.directory}/dependencies/lib</outputDirectory>
+ </artifactItem>
+
+ <artifactItem>
+ <groupId>org.jboss.shrinkwrap</groupId>
+ <artifactId>shrinkwrap-api</artifactId>
+ <outputDirectory>${project.build.directory}/dependencies/lib</outputDirectory>
+ </artifactItem>
+
+ <artifactItem>
+ <groupId>org.jboss.shrinkwrap</groupId>
+ <artifactId>shrinkwrap-spi</artifactId>
+ <outputDirectory>${project.build.directory}/dependencies/lib</outputDirectory>
+ </artifactItem>
+
+
</artifactItems>
<overWriteIfNewer>true</overWriteIfNewer>
<stripVersion>true</stripVersion>
@@ -159,75 +184,145 @@
</plugin>
- <!--
- Install no-interface package in pre-integration-test
- phase -->
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>install-nointerface-package</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <tasks>
- <ant antfile="${project.build.directory}/test-classes/build-test.xml" target="install-no-interface-package" />
- </tasks>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <!--
- After installing the no-interface package, now start the
- server in pre-integration-test phase
- -->
- <plugin>
- <groupId>org.jboss.maven.plugins.jbossas</groupId>
- <artifactId>maven-jboss-as-control-plugin</artifactId>
- <version>0.1.1</version>
- <executions>
- <!-- Start AS -->
- <execution>
- <id>start-jboss-as</id>
- <goals>
- <goal>start</goal>
- </goals>
- <phase>pre-integration-test</phase>
- <configuration>
- <serverConfigName>${jboss.server.config}</serverConfigName>
- <jvmArgs>
- <jvmArg>-Xms128m</jvmArg>
- <jvmArg>-Xmx1024m</jvmArg>
- <jvmArg>-XX:MaxPermSize=256m</jvmArg>
- <jvmArg>-Dorg.jboss.resolver.warning=true</jvmArg>
- <jvmArg>-Dsun.rmi.dgc.client.gcInterval=3600000</jvmArg>
- <jvmArg>-Dsun.rmi.dgc.server.gcInterval=3600000</jvmArg>
- <!-- Temporary, till AS boots without this property JBAS-6744 -->
- <jvmArg>-Dxb.builder.useUnorderedSequence=true</jvmArg>
- </jvmArgs>
- <jboss.test.run>true</jboss.test.run>
- </configuration>
- </execution>
+ <!--
+ Install no-interface packages in pre-integration-test phase
+ -->
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+ <executions>
+ <execution>
+ <id>install-nointerface-packages</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks unless="skip.packagemanager">
+ <ant antfile="${project.build.directory}/test-classes/build-test.xml"
+ target="install-no-interface-package" inheritRefs="true"
+ inheritAll="true" />
+ </tasks>
+ </configuration>
+ </execution>
- <!-- Stop AS -->
- <execution>
- <id>stop-jboss-as</id>
- <goals>
- <goal>stop</goal>
- </goals>
- <phase>post-integration-test</phase>
- <configuration>
- <serverConfigName>${jboss.server.config}</serverConfigName>
- <jboss.test.run>true</jboss.test.run>
- </configuration>
- </execution>
+ <execution>
+ <id>run-tests</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks unless="test">
+ <ant antfile="${project.build.directory}/test-classes/test.xml"
+ target="tests" inheritRefs="true" inheritAll="true" />
+ </tasks>
+ </configuration>
- </executions>
- </plugin>
+ </execution>
+ <execution>
+ <id>run-one-test</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks if="test">
+ <ant antfile="${project.build.directory}/test-classes/test.xml"
+ target="one-test" inheritRefs="true" inheritAll="true" />
+ </tasks>
+ </configuration>
+
+ </execution>
+ </executions>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.7.1</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+
+ <!--
+ After installing the no-interface package, now start the server in
+ pre-integration-test phase
+ -->
+ <plugin>
+ <groupId>org.jboss.maven.plugins.jbossas</groupId>
+ <artifactId>maven-jboss-as-control-plugin</artifactId>
+ <version>0.1.1</version>
+ <executions>
+ <!-- Start AS -->
+ <execution>
+ <id>start-jboss-as</id>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ <phase>pre-integration-test</phase>
+ <configuration>
+ <serverConfigName>${jboss.server.config}</serverConfigName>
+ <jvmArgs>
+ <jvmArg>-Xms128m</jvmArg>
+ <jvmArg>-Xmx1024m</jvmArg>
+ <jvmArg>-XX:MaxPermSize=256m</jvmArg>
+ <jvmArg>-Dorg.jboss.resolver.warning=true</jvmArg>
+ <jvmArg>-Dsun.rmi.dgc.client.gcInterval=3600000</jvmArg>
+ <jvmArg>-Dsun.rmi.dgc.server.gcInterval=3600000</jvmArg>
+ <!--
+ Prefer IPv4 stack as as temporary workaround to avoid 'all'
+ config startup issues from IPv4 multicast addresses. See
+ JBAS-7936
+ -->
+ <jvmArg>-Djava.net.preferIPv4Stack=true</jvmArg>
+ <!-- Temporary, till AS boots without this property JBAS-6744 -->
+ <jvmArg>-Dxb.builder.useUnorderedSequence=true</jvmArg>
+ <!--
+ Uncomment to add debug JVM params
+ <jvmArg>-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n</jvmArg>
+ -->
+ </jvmArgs>
+ <jboss.test.run>true</jboss.test.run>
+ </configuration>
+ </execution>
+
+ <!-- Stop AS -->
+ <execution>
+ <id>stop-jboss-as</id>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ <phase>post-integration-test</phase>
+ <configuration>
+ <serverConfigName>${jboss.server.config}</serverConfigName>
+ <jboss.test.run>true</jboss.test.run>
+ </configuration>
+ </execution>
+
+ </executions>
+ <dependencies>
+ <!--
+ We need this dependency because the maven-jboss-as-control-plugin
+ connects to the MBeanServer to issue a stop request. The
+ MBeanServerConnection returned is actually a proxy which requires
+ a JBoss specific class (present in jboss-system-client.jar) to be
+ available in the classpath. See
+ https://jira.jboss.org/browse/JBAS-7818?focusedCommentId=12523915#action_12523915
+ for details
+ -->
+ <dependency>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-as-system</artifactId>
+ <classifier>client</classifier>
+ <version>6.0.0.20100429-M3</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
+ </plugin>
+
</plugins>
</build>
@@ -241,13 +336,41 @@
</dependency>
<dependency>
- <groupId>org.jboss.shrinkwrap</groupId>
- <artifactId>shrinkwrap-impl-base</artifactId>
- <version>1.0.0-alpha-2</version>
+ <groupId>ant-contrib</groupId>
+ <artifactId>ant-contrib</artifactId>
+ <version>1.0b3</version>
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-junit</artifactId>
+ <version>1.7.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.shrinkwrap</groupId>
+ <artifactId>shrinkwrap-api</artifactId>
+ <version>1.0.0-alpha-2</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.shrinkwrap</groupId>
+ <artifactId>shrinkwrap-spi</artifactId>
+ <version>1.0.0-alpha-2</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.shrinkwrap</groupId>
+ <artifactId>shrinkwrap-impl-base</artifactId>
+ <version>1.0.0-alpha-2</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
<groupId>org.jboss.javaee</groupId>
<artifactId>jboss-ejb-api_3.1</artifactId>
<version>1.0-alpha-1</version>
Modified: projects/ejb3/components/nointerface/trunk/testsuite/src/test/resources/log4j.xml
===================================================================
--- projects/ejb3/components/nointerface/trunk/testsuite/src/test/resources/log4j.xml 2010-07-29 15:24:41 UTC (rev 107209)
+++ projects/ejb3/components/nointerface/trunk/testsuite/src/test/resources/log4j.xml 2010-07-29 16:20:03 UTC (rev 107210)
@@ -20,34 +20,27 @@
<!-- Preserve messages in a local file -->
<!-- ================================= -->
- <!-- A time/date based rolling appender -->
- <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
- <param name="File" value="target/test.log"/>
- <param name="Append" value="false"/>
+
- <!-- Rollover at midnight each day -->
- <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+ <appender name="FILE" class="org.apache.log4j.RollingFileAppender">
+ <param name="File" value="test.log"/>
+ <param name="Append" value="false"/>
+ <param name="MaxFileSize" value="10000KB"/>
+ <param name="MaxBackupIndex" value="10"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+ </layout>
+ </appender>
+
- <!-- Rollover at the top of each hour
- <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
- -->
-
- <layout class="org.apache.log4j.PatternLayout">
- <!-- The default pattern: Date Priority [Category] Message\n -->
- <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
-
- <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
- <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
- -->
- </layout>
- </appender>
-
<!-- ============================== -->
<!-- Append messages to the console -->
<!-- ============================== -->
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<param name="Target" value="System.out"/>
+ <param name="Threshold" value="INFO"/>
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
@@ -60,29 +53,60 @@
<!-- Limit categories -->
<!-- ================ -->
+ <!-- Limit JBoss categories to INFO
<category name="org.jboss">
- <priority value="INFO"/>
+ <priority value="INFO" class="org.jboss.logging.XLevel"/>
</category>
+ -->
- <category name="org.jboss.ejb3">
- <priority value="ALL"/>
+ <!-- Increase the priority threshold for the DefaultDS category
+ <category name="DefaultDS">
+ <priority value="FATAL"/>
</category>
+ -->
- <category name="org.jnp">
- <priority value="INFO"/>
+ <!-- Decrease the priority threshold for the org.jboss.varia category
+ <category name="org.jboss.varia">
+ <priority value="DEBUG"/>
</category>
+ -->
- <category name="org.jboss.deployment">
- <priority value="ALL"/>
+ <!--
+ | An example of enabling the custom TRACE level priority that is used
+ | by the JBoss internals to diagnose low level details. This example
+ | turns on TRACE level msgs for the org.jboss.ejb.plugins package and its
+ | subpackages. This will produce A LOT of logging output.
+ <category name="org.jboss.system">
+ <priority value="TRACE" class="org.jboss.logging.XLevel"/>
</category>
+ -->
+ <category name="org.jboss.aop">
+ <priority value="WARN"/>
+ </category>
+
+ <category name="org.jboss">
+ <priority value="INFO"/>
+ </category>
+
+ <!--
+ Unnecessary, EJB3 is exposed as DEBUG
+ <category name="org.jboss.ejb3.interceptors.aop.DomainClassLoader">
+ <priority value="DEBUG"/>
+ </category> -->
+
+ <category name="org.jboss.ejb3">
+ <priority value="DEBUG"/>
+ </category>
+
<!-- ======================= -->
<!-- Setup the Root category -->
<!-- ======================= -->
<root>
+ <priority value="WARN" />
<appender-ref ref="CONSOLE"/>
<appender-ref ref="FILE"/>
</root>
-
+
</log4j:configuration>
Added: projects/ejb3/components/nointerface/trunk/testsuite/src/test/resources/test.xml
===================================================================
--- projects/ejb3/components/nointerface/trunk/testsuite/src/test/resources/test.xml (rev 0)
+++ projects/ejb3/components/nointerface/trunk/testsuite/src/test/resources/test.xml 2010-07-29 16:20:03 UTC (rev 107210)
@@ -0,0 +1,302 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+
+<project default="tests" name="JBoss EJB3 timerservice tests"
+ xmlns:server="http://jboss.org/ns/test/ant/server">
+
+ <!-- Define test Classpath -->
+ <path id="jboss.test.classpath">
+ <pathelement path="${jboss.test.path}"/>
+ </path>
+
+ <property environment="env"/>
+
+
+ <!-- Set "jboss.dist" to JBOSS_HOME -->
+ <property name="jboss.dist" value="${env.JBOSS_HOME}"/>
+
+
+ <!-- Externalized locations -->
+ <property name="location.resources.main" value="${basedir}/src/main/resources"/>
+ <property name="location.resources.test" value="${basedir}/src/test/resources"/>
+ <property name="location.target" value="${basedir}/target"/>
+ <property name="location.dependencies" value="${location.target}/dependencies"/>
+ <property name="location.dependencies.unpacked" value="${location.dependencies}/unpacked"/>
+ <property name="location.dependencies.unpacked.jboss-test:jboss.test" value="${location.dependencies.unpacked}/jboss-test"/>
+
+ <!-- We only allow dependencies lib for the test harness (not runtime components, those must come from JBOSS_HOME -->
+ <property name="location.dependencies.lib" value="${location.dependencies}/lib"/>
+ <property name="location.dependencies.lib.junit:junit" value="${location.dependencies.lib}/junit.jar"/>
+ <property name="location.dependencies.lib.antcontrib:antcontrib" value="${location.dependencies.lib}/ant-contrib.jar"/>
+ <property name="location.dependencies.lib.ant-junit" value="${location.dependencies.lib}/ant-junit.jar"/>
+
+ <property name="location.lib" value="${jboss.dist}/lib"/>
+
+ <property name="location.client.lib" value="${jboss.dist}/client"/>
+ <property name="location.client.lib.jbossall" value="${location.client.lib}/jbossall-client.jar"/>
+
+ <!-- Ant-contrib tasks -->
+ <taskdef resource="net/sf/antcontrib/antlib.xml">
+ <classpath>
+ <pathelement location="${location.dependencies.lib.antcontrib:antcontrib}" />
+ </classpath>
+ </taskdef>
+
+ <!-- Ant-junit tasks-->
+ <taskdef name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
+ <classpath>
+ <pathelement location="${location.dependencies.lib.ant-junit}" />
+ <pathelement location="${location.dependencies.lib.junit:junit}" />
+ </classpath>
+ </taskdef>
+
+
+ <!-- =================== -->
+ <!-- Basic Configuration -->
+ <!-- =================== -->
+
+ <!-- Module name(s) & version -->
+ <property name="module.name" value="ejb3"/>
+ <property name="module.Name" value="JBoss EJB3 no-interface Testsuite"/>
+ <property name="module.version" value="DEV"/>
+ <property name="module.source" value="${basedir}/src"/>
+ <property name="module.output" value="${basedir}/target"/>
+
+
+ <!-- ========= -->
+ <!-- Libraries -->
+ <!-- ========= -->
+
+ <!--
+
+ Classpath used by the Test Client
+
+ -->
+ <path id="client.classpath">
+
+ <!-- JBoss Client Binaries -->
+ <fileset dir="${location.client.lib}" includes="*.jar"/>
+ <pathelement path="${location.client.lib.jbossall}" />
+ </path>
+
+ <!--
+
+ Classpath used by Unit Tests
+
+ -->
+ <path id="test.classpath">
+
+ <fileset dir="${location.dependencies.lib}">
+ <include name="*.jar"/>
+ </fileset>
+
+ <!-- Client -->
+ <path refid="client.classpath" />
+
+
+ <!-- JUnit -->
+
+
+ <!-- Root of jndi.properties -->
+ <pathelement location="${resources}/test" />
+
+ <!-- Resources required on the client CP -->
+ <pathelement location="${location.target}/test-classes/" />
+
+
+ </path>
+
+
+ <!-- Where source files live -->
+ <property name="source.java" value="${module.source}/test/java"/>
+ <property name="source.etc" value="${module.source}/etc"/>
+ <property name="resources" value="${location.resources.test}"/>
+ <property name="source.stylesheets" value="${location.dependencies.unpacked.jboss-test:jboss.test}/stylesheets"/>
+
+ <!-- Where build generated files will go -->
+ <property name="build.reports" value="${module.output}/reports"/>
+ <property name="build.testlog" value="${module.output}/log"/>
+ <property name="build.classes" value="${module.output}/test-classes"/>
+ <property name="build.stylesheets" value="${location.dependencies.unpacked.jboss-test:jboss.test}/stylesheets"/>
+
+
+ <target name="init">
+ <record name="${basedir}/build.log" append="yes" action="start" loglevel="error"/>
+ <!-- Setup the version 1 classes so the tests compile -->
+ </target>
+
+
+
+ <target name="test" depends="init" if="test"
+ description="Execute all tests in the given test directory.">
+ <!-- For use when we do not need to pass in any special jvmargs; forks the test process -->
+ <antcall target="test-with-jvmargs" inheritRefs="true">
+ <param name="test" value="${test}"/>
+ <!--
+ EJBTHREE-1934
+ Webservices testcases (with JDK 1.6 variant of the AS) requires that the javax.xml.soap.*
+ classes are loaded from JBoss specific jars available in JBOSS_HOME/lib/endorsed
+ instead of JAVA_HOME/lib/endorsed. Else they run into
+ java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
+ See this for more details http://www.jboss.org/index.html?module=bb&op=viewtopic&t=158265
+
+ Note: we could have set this property only for the webservices testcase conditionally,
+ but it makes sense for all tests to use this JVM arg since that's what gets used in the AS run.sh
+ scripts.
+ -->
+ <param name="jvmargs" value="-Djava.endorsed.dirs=${jboss.dist}/lib/endorsed"/>
+ </antcall>
+ </target>
+
+ <target name="test-with-jvmargs" if="test">
+ <!-- For use when we need to pass in special jvmargs -->
+
+ <mkdir dir="${build.reports}"/>
+ <mkdir dir="${build.testlog}"/>
+ <!-- Remove the test.log so each run has a fresh log -->
+ <delete file="${build.testlog}/test.log"/>
+
+
+ <!-- Use this for debugging classpath
+ <property name="myclasspath" refid="test.classpath"/>
+ <echo message="${myclasspath}" /> -->
+
+ <junit dir="${module.output}"
+ printsummary="yes"
+ haltonerror="false"
+ haltonfailure="false"
+ showoutput="yes"
+ fork="true"
+ failureproperty = "test.failure">
+
+ <sysproperty key="basedir" value="${basedir}"/>
+ <sysproperty key="build.testlog" value="${build.testlog}"/>
+ <sysproperty key="log4j.configuration" value="file:${location.resources.test}/log4j.xml"/>
+
+
+ <jvmarg line="${jvmargs}" />
+ <jvmarg line="-ea" />
+ <!--
+ <jvmarg line="-verbose:class" />
+ <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=/dt_socket,address=8787,server=y,suspend=y"/>
+ -->
+
+ <classpath>
+ <path refid="test.classpath" />
+ </classpath>
+
+ <formatter type="plain" usefile="true"/>
+ <formatter type="xml" usefile="true"/>
+ <!--
+ <formatter type="xml" classname="org.jboss.ejb3.testsuite.ant.taskdefs.optional.junit.KnownIssuesXMLJunitResultFormatter"
+ usefile="true" unless="test.extension"/>
+ -->
+
+ <batchtest todir="${build.reports}"
+ haltonerror="false"
+ haltonfailure="false"
+ fork="true">
+
+ <fileset dir="${build.classes}">
+ <include name="org/jboss/ejb3/nointerface/integration/test/${test}/unit/*TestCase.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+
+ <antcall target="check.test.failure"/>
+
+ </target>
+
+ <target name="one-test" depends="init" if="test"
+ description="Execute one test Junit test case.">
+ <!-- For use when we do not need to pass in any special jvmargs; forks the test process -->
+ <antcall target="one-test-with-jvmargs" inheritRefs="true">
+ <param name="test" value="${test}"/>
+ <!--
+ EJBTHREE-1934
+ Webservices testcases (with JDK 1.6 variant of the AS) requires that the javax.xml.soap.*
+ classes are loaded from JBoss specific jars available in JBOSS_HOME/lib/endorsed
+ instead of JAVA_HOME/lib/endorsed. Else they run into
+ java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
+ See this for more details http://www.jboss.org/index.html?module=bb&op=viewtopic&t=158265
+
+ Note: we could have set this property only for the webservices testcase conditionally,
+ but it makes sense for all tests to use this JVM arg since that's what gets used in the AS run.sh
+ scripts.
+ -->
+ <param name="jvmargs" value="-Djava.endorsed.dirs=${jboss.dist}/lib/endorsed"/>
+ </antcall>
+ </target>
+
+ <!-- Single unit test -->
+ <target name="one-test-with-jvmargs" if="test">
+ <!-- For use when we need to pass in special jvmargs -->
+
+
+ <mkdir dir="${build.reports}"/>
+ <mkdir dir="${build.testlog}"/>
+ <!-- Remove the test.log so each run has a fresh log -->
+ <delete file="${build.testlog}/test.log"/>
+
+ <!-- Ensure JBOSS_HOME is set -->
+ <fail unless="env.JBOSS_HOME" message="Environment Variable $JBOSS_HOME must be Set" />
+
+ <junit dir="${module.output}"
+ printsummary="yes"
+ haltonerror="false"
+ haltonfailure="false"
+ showoutput="yes"
+ fork="true"
+ failureproperty = "test.failure">
+
+ <sysproperty key="basedir" value="${basedir}"/>
+ <sysproperty key="build.testlog" value="${build.testlog}"/>
+ <sysproperty key="log4j.configuration" value="file:${location.resources.test}/log4j.xml"/>
+
+ <jvmarg line="${jvmargs}" />
+ <!--
+ <jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=/dt_socket,address=8787,server=y,suspend=y"/>
+ -->
+ <classpath>
+
+ <path refid="test.classpath" />
+ <pathelement location="${build.classes}"/>
+ </classpath>
+
+ <formatter type="plain" usefile="true"/>
+ <formatter type="xml" usefile="true"/>
+ <test name="${test}" todir="${build.reports}"/>
+ </junit>
+
+ <antcall target="check.test.failure"/>
+
+ </target>
+
+
+
+ <target name="tests" depends="init" description="Execute all tests">
+ <!-- For use when we do not need to pass in any special jvmargs; forks the test process -->
+ <antcall target="test-with-jvmargs" inheritRefs="true">
+ <param name="test" value="**"/>
+ <!--
+ EJBTHREE-1934
+ Webservices testcases (with JDK 1.6 variant of the AS) requires that the javax.xml.soap.*
+ classes are loaded from JBoss specific jars available in JBOSS_HOME/lib/endorsed
+ instead of JAVA_HOME/lib/endorsed. Else they run into
+ java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
+ See this for more details http://www.jboss.org/index.html?module=bb&op=viewtopic&t=158265
+
+ Note: we could have set this property only for the webservices testcase conditionally,
+ but it makes sense for all tests to use this JVM arg since that's what gets used in the AS run.sh
+ scripts.
+ -->
+ <param name="jvmargs" value="-Djava.endorsed.dirs=${jboss.dist}/lib/endorsed"/>
+ </antcall>
+
+ </target>
+
+ <target name="check.test.failure" if="test.failure">
+ <fail message="Some tests FAILED. Check the logs for details"/>
+ </target>
+
+</project>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list