Daniel John Debrunner wrote:
>> - Changed to only test SimpleDataSource for embedded
>>
>>
>
>Can you expand on this last item. The purpose of the test is to check
>all data sources for embedded, the comment implies to me that we are now
>not testing EmbeddedDataSource. Or did I misunderstand?
>
>
>
This was poorly worded. Maybe move the only to the end.
- Changed to test SimpleDataSource for embedded only.
patch 1 changed the test to use the TestUtil.getXXXDataSource methods
so that it could run with both client and embedded.
So, for example when run with -Dframework=DerbyNetClient it will test
ClientXADataSource instead of EmbeddedXADataSource. SimpleDataSource is
relevant only to embedded so is not run for client.
Here are the three booleans and comments from the patch. Dan mentioned
to me offline that for
needRollbackBeforePCGetConnection the embedded behaviour is correct. So
that one need to have the comment changed and a Jira filed. I will take
care of that in continuing work on DERBY-435 and also move the "only" to
the end of most sentences.
// Only test connection toString values for embedded.
// Client connection toString values are not correlated at this time
and just
// use default toString
// These tests are exempted from other frameworks
private static boolean testConnectionToString =
TestUtil.isEmbeddedFramework();
// Only embedded supports SimpleDataSource (JSR169).
// These tests are exempted from other frameworks
private static boolean testSimpleDataSource =
TestUtil.isEmbeddedFramework();
// for a PooledConnection.getConnection() the connection gets closed.
// Embedded automatically rolls back any activity on the connection.
// Client requires the user to rollback and gives an SQLException
// java.sql.Connection.close() requested while a transaction is in
progress
// I think client is right here (kmarsden), the user should have to
rollback
private static boolean needRollbackBeforePCGetConnection =
TestUtil.isDerbyNetClientFramework();