Menu

#239 specify the schema via the api

closed-fixed
Bug (232)
5
2009-03-14
2009-03-11
lumpynose
No

I'm using DataSourceDatabaseTester and I'm getting the following warning:

2009-03-10 15:24:17.233 PDT, WARN: org.dbunit.AbstractDatabaseTester.setSchema.123: setSchema() should not be used anymore

The api docs for org.dbunit.IDatabaseTester say for setSchema(): "Deprecated. since 2.4.3 Should not be used anymore. Every concrete IDatabaseTester implementation that needs a schema has the possibility to set it somehow in the constructor".

Of the 5 concrete classes that implement IDatabaseTester; DataSourceDatabaseTester, DefaultDatabaseTester, JdbcDatabaseTester, JndiDatabaseTester, PropertiesBasedJdbcDatabaseTester, only JdbcDatabaseTester provides a constructor that allows you to specify the schema, and PropertiesBasedJdbcDatabaseTester provides a way to set the schema via a system property.

Discussion

  • matthias g

    matthias g - 2009-03-14

    I added the following constructors (for the 2.4.5 release, svn rev. 983):

    public DataSourceDatabaseTester(DataSource dataSource, String schema)
    public JndiDatabaseTester(Properties environment, String lookupName, String schema)

    so that the schema name can be specified.

    regards,
    matthias

     
  • matthias g

    matthias g - 2009-03-14
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB