db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nyenyec N <nyen...@gmail.com>
Subject Speeding up unit tests that need a clean database?
Date Thu, 30 Sep 2004 22:10:41 GMT

I have several JUnit tests that I run as part of the builds and also
from inside the Eclipse IDE.
So far my app uses SQL Server and HSQLDB. In both cases I found a way
to quickly create a clean database (with no tables) use it and discard
it after each test.

In SQL Server I use the CREATE/DROP DATABASE call, in HSQLDB I simply
use an in-memory instance. Creating and discarding a database takes
about 2 secs in SQL Server and 1 sec in HSQLDB.

In Derby however, connecting to a URL like this
takes about 20 secs on the same machine (P4, 1Gb mem).
Is there a way to do this quicker or approximate the behavior
described above in some other way?


View raw message