db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-2000) A SecurityManager is not always installed when running JUnit tests/suites
Date Tue, 07 Nov 2006 11:24:53 GMT
     [ http://issues.apache.org/jira/browse/DERBY-2000?page=all ]

Kristian Waagan updated DERBY-2000:

    Attachment: derby-2000-1a.diff

'derby-2000-1a.diff' is a workaround to allow all out JUnit tests to be able to create derby.system.home
(defaults to '<current_working_directory>/system' for the tests). The only change is
adding the 'write' permission for the derby.system.home directory itself, and a comment.

Briefly stated, some tests fail because the code is run under a security manager, while the
rest succeed because the decorator/setup code runs without a security manager (and Derby is
normally booted here).
Further, the reason why failing tests do not fail when run as part of a larger suite, is that
derby.system.home has already been created then.

I ran all JUnit tests individually and the All suite. Only known problems spotted. An example
test to run to see the effect of the patch, is 'jdbcapi/UpdateXXXTest'.

Patch ready for review/commit.

> A SecurityManager is not always installed when running JUnit tests/suites
> -------------------------------------------------------------------------
>                 Key: DERBY-2000
>                 URL: http://issues.apache.org/jira/browse/DERBY-2000
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions:
>            Reporter: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-2000-1a.diff
> A SecurityManager is not always installed (early enough) when running JUnit tests/suites.
> For instance, when running 'jdbcapi.BlobClob4Blob' a SecurityManager was installed during
database boot and revealed problems with the policy file, but when the same test was run as
part of 'suites.All', no errors were seen.
> BTW: There is nothing wrong with BlobClob4Blob.
> It seems that 'BaseTestCase.runBare', which installs a SecurityManager, is bypassed when
running code in decorators (most importantly setUp).
> Since a SecurityManager is installed as soon as a test method is run, this bug is not
that severe.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message