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

Knut Anders Hatlen updated DERBY-5701:
--------------------------------------

    Attachment: d5701-1a.diff

Attaching a patch which makes the following changes to the test:

runTestUpdateXXXAllDataTypesInsertRow() - create a single statement that is 
re-used across iterations, instead of creating a new statement on each 
iteration, and close it when done.

verifyData() - reorganize some if/else-if statements to get rid of return 
statements that prevent close() from being called, and use 
BaseJDBCTestCase.closeStatement() to prevent BaseJDBCTestCase.statements from 
accumulating hundreds of statements.

resetData() - close the statement when done.

It was primarily the changes in verifyData() that helped on the heap usage.

The test finished successfully with 15 MB heap after the patch was applied.
                
> Make UpdatableResultSetTest less hungry on heap space
> -----------------------------------------------------
>
>                 Key: DERBY-5701
>                 URL: https://issues.apache.org/jira/browse/DERBY-5701
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.9.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>         Attachments: d5701-1a.diff
>
>
> UpdatableResultSetTest fails with an OutOfMemoryError in my environment when 
> I run it with a 50 MB heap. Some of its test cases open close to 900 
> statements, and they leave many of the statements open till tearDown(). It 
> would be good if the test cases cleaned up the open statements earlier to 
> avoid these peaks in memory usage.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to