compile.target=1.5
compile.debug=true
+# ----- Settings for Junit test database.
+
+# Common settings
+testdb.username=root
+testdb.password=password
+
+# H2
+testdb.url=jdbc:h2x:~/.h2/test;QUERY_TIMEOUT=0;DB_CLOSE_ON_EXIT=FALSE
+testdb.driverClassName=org.h2.Driver
+testdb.validationQuery=SELECT 1
+
+# MySQL
+#testdb.url=jdbc:mysql://localhost:3306/mysql?autoReconnect=true
+#testdb.driverClassName=com.mysql.jdbc.Driver
+#testdb.validationQuery=SELECT 1
+
+# Derby
+#testdb.url=jdbc:derby:derbyDB;create=true
+#testdb.driverClassName=org.apache.derby.jdbc.EmbeddedDriver
+#testdb.validationQuery=VALUES 1
+
# ----- JUnit Unit Test Suite, version 3.7 or later -----
junit.home=${base.path}/junit3.8.2
junit.lib=${junit.home}
</antcall>
</target>
+ <!-- Extract the testdb.* properties and remove the leading testdb. -->
+ <propertyset dynamic="false" id="testdb">
+ <propertyref prefix="testdb"/>
+ <mapper type="regexp" from="^testdb\.(.*)$$" to="\1"/>
+ </propertyset>
+
<target name="test" depends="build,build-test">
<echo/>
<echo>Creating test table for test purposes.</echo>
<junit printsummary="withOutAndErr" showoutput="on">
+ <syspropertyset refid="testdb"/>
<classpath refid="tomcat.jdbc.classpath"/>
<classpath refid="test.classpath"/>
<batchtest fork="yes" todir="${tomcat.testclasses}">
<echo/>
<echo>Performance and fairness tests.</echo>
<junit printsummary="withOutAndErr" showoutput="on">
+ <syspropertyset refid="testdb"/>
<classpath refid="tomcat.jdbc.classpath"/>
<classpath refid="test.classpath"/>
<batchtest fork="yes" todir="${tomcat.testclasses}">
<echo/>
<echo>Functional tests.</echo>
<junit printsummary="yes">
+ <syspropertyset refid="testdb"/>
<formatter type="plain"/>
<classpath refid="tomcat.jdbc.classpath"/>
<classpath refid="test.classpath"/>