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

Knut Anders Hatlen updated DERBY-4884:
--------------------------------------

    Attachment: derby-4884-1a.diff

Here's a patch (1a) that makes the necessary changes to the encryption 
decorator (Decorator.encryptedDatabase()) to support rebooting using the normal 
helper methods (e.g., TestConfiguration.shutdownDatabase()). It doesn't touch 
any of the tests that use the decorator, and there are more changes needed to 
make them set static properties correctly using DatabasePropertyTestSetup.

Changes made by this patch:

- TestConfiguration: Add support for extra connection attributes in the 
configuration.

- DriverManagerConnector: Pick up connection attributes from the 
TestConfiguration.

- JDBCDataSource: Pick up connection attributes from the TestConfiguration. 
This will make all DataSource-based connectors use the connection attributes.

- Decorator: Use a ChangeConfigurationSetup that adds connection attributes to 
the current configuration when decorating encryption tests (and, because of 
code sharing, also collation tests). Stop creating the database in the 
decorator's setUp(), since the other changes makes the framework create the 
database automatically on the first connection attempt, just like other 
tests/decorators.

- DatabaseMetaDataTest: Work-around for DERBY-4886. Since the framework changes 
makes openDefaultConnection() use the extra connection attributes, and 
DatabaseMetaDataTest is invoked by CollationTest with extra attributes, the 
test of getURL() in DatabaseMetaDataTest will see a different URL in client 
mode.

Regression tests ran cleanly with the patch.

> DatabasePropertyTestSetup cannot change static properties in encrypted 
> databases
> --------------------------------------------------------------------------------
>
>                 Key: DERBY-4884
>                 URL: https://issues.apache.org/jira/browse/DERBY-4884
>             Project: Derby
>          Issue Type: Bug
>          Components: Test
>    Affects Versions: 10.7.1.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>         Attachments: derby-4884-1a.diff
>
>
> DatabasePropertyTestSetup needs to reboot the database in order to set static 
> properties. In tests with encrypted databases, the database cannot be 
> rebooted because the boot password is only known inside the setUp() method of 
> the decorator created by Decorator.encryptedDatabase().
> One of the problems that results from this, is that BlobClob4Blob test cannot 
> reduce the lock timeout for the encrypted variant of the test. Since there 
> are four test cases that wait for a lock timeout, the test takes almost four 
> minutes longer than it would have if the lock timeout had been reduced.

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

Reply via email to