db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Suran Jayathilaka" <suran...@gmail.com>
Subject Test conversion - fixture specific table creation
Date Fri, 09 May 2008 19:18:52 GMT
Hi,

I'm currently working on converting the test store/streamingColumn to JUnit.
One problem I am facing is as follows.

The many test methods in this class have create  table statements,
mostly with the same table name "foo".
A best practice is to move the create statements to the
CleanDatabaseTestSetup.decorateSQL() method in baseSuite(). But in
this case, that'll mean more than 20 unnecessary tables that get
created and dropped for each and every fixture, as according to my
understanding, the decorateSQL() method is run before each fixture.

Is this sort of behavior acceptable in the context of this testcase?
Or is there a better way to have only the table required for a
specific fixture be created, while retaining the automatic cleanup
provided by the decorateSQL() method?

Thanks.
Suran.

Mime
View raw message