[ http://issues.apache.org/jira/browse/DERBY-1826?page=all ]

Deepa Remesh updated DERBY-1826:
--------------------------------

    Attachment: derby-1826-v1.diff
                derby-1826-v1.status

The attached patch  'derby-1826-v1.diff' adds methods to get connection by 
specifying connection attributes. These can be used to shutdown 
databases/system. 

Changes in the patch:
* Adds following methods to TestConfiguration and corresponding wrapper methods 
to BaseJDBCTestCase:
getDefaultConnection(String connAttrs)
getConnection (String databaseName, String connAttrs)

These methods can be used to get connection using specific connection 
attributes. By passing shutdown attribute, these can be used to shutdown 
database/system.

Without this patch, this was possible using 
BaseJDBCTestCase.openConnection(String databaseName) method and passing in 
databaseName+";<connection attributes>". To shutdown default database, we would 
need to explicitly pass in the default database name. I think the new methods 
in the patch improve the usage.

* Changes methods used to set DataSource properties to take in connection 
attributes.

* Changes lang/SQLAuthorizationProp test to use the new method to shutdown the 
database.

With the patch, I successfully ran the JUnit Embedded suite standalone. I tried 
to run "All" suite standalone but getting OutOfMemoryError in client suite. I 
am getting the memory errors even without this patch. I will open a separate 
issue for it. I am currently running derbyall to check the changes in the 
helper methods have not affected any other tests.

Please provide feedback on the patch. I would appreciate if anyone can also 
check if the changes fit into the current JUnit infrastructure.

> Add JUnit utility methods for database/server shutdown
> ------------------------------------------------------
>
>                 Key: DERBY-1826
>                 URL: http://issues.apache.org/jira/browse/DERBY-1826
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>            Reporter: Deepa Remesh
>         Assigned To: Deepa Remesh
>            Priority: Minor
>         Attachments: derby-1826-v1.diff, derby-1826-v1.status
>
>
> Dan suggested a good place to add these is TestConfiguration class. See 
> http://issues.apache.org/jira/browse/DERBY-1522#action_12433121

-- 
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

        

Reply via email to