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 "Deepa Remesh (JIRA)" <de...@db.apache.org> on 2006/09/12 23:44:23 UTC

[jira] Updated: (DERBY-1826) Add JUnit utility methods for database/server shutdown

     [ 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

        

Re: [jira] Updated: (DERBY-1826) Add JUnit utility methods for database/server shutdown

Posted by Kristian Waagan <Kr...@Sun.COM>.
Deepa Remesh wrote:
> On 9/19/06, Kristian Waagan <Kr...@sun.com> wrote:
>> Hi Deepa,
>>
>> I'm rewriting the test encryptionKey.sql using these features, and in
>> that way I hope to test them and to pick up problems, if there are any :)
>>
>> Working perfect so far, I'll post a comment to Jira when I'm done, and
>> add the test itself to DERBY-1001.
>>
>>
> 
> Thanks Kristian for offering to try the patch. I was wondering if you
> have any updates after your tests. 

Hi Deepa,

I'm able to do what I want with your additions to the JUnit 
infrastructure, and I have not found any problems with the patch.
Regarding my test, I do have a problem with the security manager, but I 
believe it is not related to this Jira.


Nice patch, thanks for adding the feature :)

+1 for commit.


-- 
Kristian


Or if there are comments from
> anyone else who has looked at the patch ?
> 
> Thanks,
> Deepa



Re: [jira] Updated: (DERBY-1826) Add JUnit utility methods for database/server shutdown

Posted by Deepa Remesh <dr...@gmail.com>.
On 9/19/06, Kristian Waagan <Kr...@sun.com> wrote:
> Hi Deepa,
>
> I'm rewriting the test encryptionKey.sql using these features, and in
> that way I hope to test them and to pick up problems, if there are any :)
>
> Working perfect so far, I'll post a comment to Jira when I'm done, and
> add the test itself to DERBY-1001.
>
>

Thanks Kristian for offering to try the patch. I was wondering if you
have any updates after your tests. Or if there are comments from
anyone else who has looked at the patch ?

Thanks,
Deepa

Re: [jira] Updated: (DERBY-1826) Add JUnit utility methods for database/server shutdown

Posted by Kristian Waagan <Kr...@Sun.COM>.
Hi Deepa,

I'm rewriting the test encryptionKey.sql using these features, and in 
that way I hope to test them and to pick up problems, if there are any :)

Working perfect so far, I'll post a comment to Jira when I'm done, and 
add the test itself to DERBY-1001.



regards,
-- 
Kristian


Deepa Remesh (JIRA) wrote:
>      [ 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
>