Bryan Pendleton wrote:
During the review for DERBY-1490, several reviewers noted that it would
be useful to be able to run various tests in two configurations:
- with sqlAuthorization=true
- with sqlAuthorization=false
A good example of this is the test suite lang/altertable.sql, which
currently runs with sqlAuthorization=true, but since there are a variety
of different code paths for both sqlAuthorization configurations, it would
be nice if this test suite also ran with sqlAuthorization=false.
How does the new JUnit framework handle this situation? Will this problem
"go away" when all the lang/*.sql tests have been converted to JUnit?
By default tests run in the old authorization mode.
A decorator utility method exists to run tests in SQL Authorization
mode, TestConfiguration.sqlAuthorizationDecorator().
This allows the test to configure itself as it desires, not sure if it
solves the "problem" or not. I would recommend trying to determine what
value running the test in a different environment has. If the same test
cases work and pass in both modes then probably no additional testing
resulted due to the run in SQL authorization mode.
This page contains an initial FAQ list on how to with Derby's JUnit setup.
http://wiki.apache.org/db-derby/KillDerbyTestHarness
Dan.