db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@debrunners.com>
Subject Re: running tests with j9?
Date Fri, 13 May 2005 21:00:19 GMT
Myrna van Lunteren wrote:


>>>>Note that with foundation, with wsdd5.6 there is no support for
>>>>java.sql.* (you'll get an incompatible library error if you try) and
>>>>with wctme5.7 foundation you are supposed to use jdbc.jar (again,
>>>>database_enabler.jar will give incompatible library with jclFoun).
>>>>Jdbc.jar does not have (for example) java.sql.DriverManager as that
>>>>class is not in JSR169. So with foundation you have to run the test
>>>>harness with java.sql.DataSource. I've never tried that.
>>>
>>>I have though :-)
>>
>>And? Details, please?

Sorry it took a while, I had to remember how to get the quoting correct
in a shell script so I could provide a working example.
BTW the tets harness property jvmflags is not documented in the testing
read me file.

The test harness uses the ij properties ij.driver and ij.database (set
to a JDBC URL) to specify the default connection for the tests. This
works for .sql tests and .java tests that use the ij utility to start
the database. However ij also supports similar properties to get the
default connection via a datasource, and these override
ij.driver/database :-)

ij.dataSource=<classname of data source>

Set the properties with any number of
ij.dataSource.<bean property>=<value>

So here is an extract of a script to run tests using the (current :-)
standard Derby data source

Dan.

-------

ds="-Dij.dataSource=org.apache.derby.jdbc.EmbeddedDataSource
-Dij.dataSource.databaseName=wombat -Dij.dataSource.createDatabase=create"

# ensure flags are passed onto the spawned vm
dsj="-Djvmflags=${ds}"

${jre}/bin/java ${ds} "${dsj}"
org.apache.derbyTesting.functionTests.harness.RunTest $*


Mime
View raw message