[ 
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-2a.diff

Here's a second patch that makes BlobClob4BlobTest and DeadlockModeTest use the 
reduced timeouts when running against encrypted databases. The patch changes 
the order of the decorators so that the DatabasePropertyTestSetup executes 
inside the encryption decorator, and this ensures that it works on the 
encrypted database instead of on the default database.

DeadlockModeTest had one more problem that needed to be fixed. The encrypted 
variant always worked on the default (non-encrypted) database, not only when 
setting the timeouts, but also when doing database operations in the test case. 
The reason for this was that all the database connections were opened in helper 
threads, and the decorators only change the test configuration for the current 
thread (in a thread local field in TestConfiguration), so the connections would 
always be opened against the default database. I therefore made the test open 
all the connections in the main JUnit thread and pass the Connection objects as 
arguments to the helper threads when creating them.

With this patch, the time to run BlobClob4BlobTest was reduced from 5 min 25 
sec to 1 min 40 sec in my environment. (No change in run time for 
DeadlockModeTest since it doesn't usually see lock timeouts.)

> 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, derby-4884-2a.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