Re : DataSourceDatabaseTester skip schema information

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re : DataSourceDatabaseTester skip schema information

Hi Arnaud,

It looks like an issue with DbUnit:  it simply doesn't do anything with the schema passed to the DataSourceDatabaseTester.  I guess the code in that class should something similar to what is done JdbcDatabaseTester, that is:

      if( getSchema() != null )
         return new DatabaseConnection( conn, getSchema() );

Looks like an easy fix, but that would obviously require some testing...

----- Message d'origine ----
De : Arnaud Brunet <[hidden email]>
À : [hidden email]
Envoyé le : Mardi, 20 Novembre 2007, 8h59mn 32s
Objet : [dbunit-user] DataSourceDatabaseTester skip schema information


In my project, I use two types of IDatabaseTester : a DataSourceDatabaseTester and JdbcDatabaseTester.
I create my IDatabaseTester with :
dsTester = new DataSourceDatabaseTester(ds);
dsTester.setSchema( schema.toUpperCase());

jdbcTester = new JdbcDatabaseTester(driver, url, user, pass);

In Jdbc case, DBUnit use the good schema. But in case of Datasource DBUnit skip the schema. And I have an ambiguous table exception.

Why DBUnit doesn't use schema information for DataSource connection ?


Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
This email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
dbunit-user mailing list
[hidden email]