db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Re: junit tests; get*DataSource* methods in BaseJDBCTestCase causing trouble...
Date Fri, 26 May 2006 10:48:14 GMT
Myrna van Lunteren <m.v.lunteren@gmail.com> writes:

> Hi,
> With revision 389780 some methods were added into BaseJDBCTestCase.java:
> "DERBY-1157: Helper methods in BaseJDBCTestCase for creating data sources
>
> Adding getDataSource(), getConnectionPoolDataSource() and
> getXADataSource() to BaseJDBCTestCase. The new methods call various
> methods in TestUtil for creating the data sources. A minor adjustment
> had to be made to TestUtil.getDataSource() in order to make it return
> JDBC 4.0 DataSources."
>
> However, this causes trouble with the j9 jvms. So, I need to move
> these methods back out of BaseJDBCTestCase.

Out of curiosity, what kind of trouble is it causing? If the method
signatures cause trouble when the class is loaded, why isn't that the
case for TestUtil?

> I can see 3 choices for their new home:
>
> - util/TestConfiguration.java
> - util/TestUtil.java
> - util/<a new utility class specially for junit tests but I cannot
> think of a good name>
>
> My personal preference goes to TestUtil.java, but that looks like it
> is at cross purposes with the contribution of 389780. Any input?

The methods don't add significant value, so I think it's OK to remove
them from BaseJDBCTestCase and let the JUnit tests use the
corresponding methods in TestUtil instead. If it is possible, we
should try to keep getDefaultDataSourceProperties().

-- 
Knut Anders

Mime
View raw message