I am about to enable more testcases in ConcurrencyTest, which relies on
getting a lock timeout to verify a lock conflict. The problem is that
default setting for lock timeout is 60 seconds, and the test uses a lot
of time waiting for the timeout. I can make the test go 10 times faster
by reducing derby.locks.waitTimeout (and with all testcases enabled it
used 350 secs in embedded framework).
With the current harness, I could add a ConcurrencyTest_app.properties
file and set it there. However this test is now part of _Suite (a pure
junit Suite).
One quick-fix for me would be to create a _Suite_app.properties. This
would cause all junit tests in the suite to run with the same
properties. Another quick-fix would be to remove it from the _Suite, and
put it into the "old-harness" suites.
- However, if the Derby community is interested at completely replacing
the old test harness in the future, it would be good to have a pure
junit solution to this.
One solution could be to create a TestSetup, which can configure the
database for a junit Test, and delete the database once the test is
complete - i.e
public class DBSetup extends BaseJDBCTestSetup
{
public void setUp() { create and configure db }
public void tearDown() { delete db }
}
Other thoughts ?
-- Andreas