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 "Kristian Waagan (JIRA)" <ji...@apache.org> on 2007/04/11 16:33:32 UTC

[jira] Updated: (DERBY-1001) Rewrite 'store/encryptionKey.sql' to a JUnit test

     [ https://issues.apache.org/jira/browse/DERBY-1001?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan updated DERBY-1001:
-----------------------------------

    Attachment: derby-1001-1a-preliminary.stat
                derby-1001-1a-preliminary.diff

I have attached a preliminary patch for the JUnit test ('derby-1001-1a-preliminary.diff').
Review is appreciated, and I also have the following questions/observations:

 1) I'm considering ditching the subclassing approach and instead create multiple suites in EncryptionKeyTest.suite for the various encryption algorithms.
 2) How many encryption algorithms/variations should we test?
     (currently one run takes around 12 seconds on my machine)
 3) Is the getLastSQLException-approch acceptable?
 4) Error reporting still seems to be kind of broken. Exceptions from the security provider do not show in JUnit/general, but they do appear in derby.log.
 5) I have implemented a solution for the security manager issues that is not in line with my own reasoning... (see previous comment). I hope to get away with creating two separate Jiras; one to add the doPrivileged-blocks in Derby, and one to update the test.

I also need to remove the old test, and to wire the new one into a suite. These changes and feedback will be incorporated into the second patch that supersedes 1a.

> Rewrite 'store/encryptionKey.sql' to a JUnit test
> -------------------------------------------------
>
>                 Key: DERBY-1001
>                 URL: https://issues.apache.org/jira/browse/DERBY-1001
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>    Affects Versions: 10.3.0.0
>            Reporter: Kristian Waagan
>         Assigned To: Kristian Waagan
>            Priority: Minor
>         Attachments: derby-1001-1a-preliminary.diff, derby-1001-1a-preliminary.stat
>
>
> This test has failed on Solaris10 for a long time, due to issues with the default security provider on this OS. See DERBY-788 for details.
> I consider rewriting this test as interresting because it allows us to see how things can be done in "the JUnit way". 
> 1) Run test with multiple encryption algorithms with minimal test code duplication.
> 2) Special handling of exceptions for specific providers (PCKS11-Solaris).
> The rewritten test might cause some discussion on how we want to handle the issues mentioned above.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.