You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Daniel John Debrunner <dj...@apache.org> on 2006/08/25 17:22:31 UTC

[junit] Improvements, running sql scripts and security manager


A couple of improvements to the JUnit test setup that may hit problems
running tests, but I expect not.

1) derbylang suite includes lang._Suite JUnit test (not new) but the
JUnit test lang.LangScripts has been added to it. This runs a handful of
.sql scripts comparing them to the canon file. These tests are run in
addition to their existing running, e.g. lang/arithmetic.sql is run
twice,  once using the harness and once using JUnit. This is an initial
test to see how it works out, I've run tests successfully on windows and
linux.

If there are problems due to this svn revision 436817 can be backed out.

2) BaseTestCase now installs a security manager for JUnit tests. In the
case a SecurityManager has already been installed no action is taken,
this will be the case when running in the old harness. When running
Junit tests standalone (using a JUnit runner) a security manager will be
installed.

When running tests standalone with JUnit test runners the current policy
file does require that derby.system.home is set, thus I execute:

java -Dderby.system.home=${PWD} junit.textui.TestRunner <testname>

I will fix this so that the default configuration for JUnit tests
running outside of the harness sets derby.system.home.

If there are problems due to this svn revision 436820 can be backed out.

All of this is only applied to the trunk.

More improvements in a little while.
Dan.