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 "Kathey Marsden (JIRA)" <ji...@apache.org> on 2007/10/20 00:43:51 UTC

[jira] Created: (DERBY-3140) InListMultiProbeTest creates 30000 DataRow objects that do not get released during suites.All run

InListMultiProbeTest creates 30000 DataRow objects that do not get released during suites.All run
-------------------------------------------------------------------------------------------------

                 Key: DERBY-3140
                 URL: https://issues.apache.org/jira/browse/DERBY-3140
             Project: Derby
          Issue Type: Sub-task
          Components: Test
    Affects Versions: 10.4.0.0
            Reporter: Kathey Marsden
            Priority: Minor


Using jhat I noticed that there are 30000 DataRow object created by InListMultiProbeTest that do not get released after the test is complete.  This is because foreignIdToRowsMap is declared as a field in the test.  



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


[jira] Updated: (DERBY-3140) InListMultiProbeTest creates 30000 DataRow objects that do not get released during suites.All run

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-3140:
----------------------------------

    Attachment: Snapshotinstancecounts.html

snapshot of instancecounts during test run that show DataRow allocation.



> InListMultiProbeTest creates 30000 DataRow objects that do not get released during suites.All run
> -------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3140
>                 URL: https://issues.apache.org/jira/browse/DERBY-3140
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>    Affects Versions: 10.4.0.0
>            Reporter: Kathey Marsden
>            Priority: Minor
>         Attachments: Snapshotinstancecounts.html
>
>
> Using jhat I noticed that there are 30000 DataRow object created by InListMultiProbeTest that do not get released after the test is complete.  This is because foreignIdToRowsMap is declared as a field in the test.  

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


[jira] Updated: (DERBY-3140) InListMultiProbeTest creates 30000 DataRow objects that do not get released during suites.All run

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden updated DERBY-3140:
----------------------------------

    Attachment: derby-3140_diff.txt

Attached is a patch to null out foreignIdToRowsMap on teardown() for InListMultiProbeTest.  The interesting thing is that the test harness seems to keep a reference to all the classes for all the tests it has run.   I guess that makes sense so it can compile results, but it means we should be quite careful  adding fields to test classes as they will stick around.  I'll check the other tests and see if there is anything hanging around that shouldn't be.

Kathey


> InListMultiProbeTest creates 30000 DataRow objects that do not get released during suites.All run
> -------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3140
>                 URL: https://issues.apache.org/jira/browse/DERBY-3140
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>    Affects Versions: 10.4.0.0
>            Reporter: Kathey Marsden
>            Assignee: Kathey Marsden
>            Priority: Minor
>         Attachments: derby-3140_diff.txt, Snapshotinstancecounts.html
>
>
> Using jhat I noticed that there are 30000 DataRow object created by InListMultiProbeTest that do not get released after the test is complete.  This is because foreignIdToRowsMap is declared as a field in the test.  

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


[jira] Commented: (DERBY-3140) InListMultiProbeTest creates 30000 DataRow objects that do not get released during suites.All run

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536475 ] 

Kristian Waagan commented on DERBY-3140:
----------------------------------------

I guess this also means that larger data structures required for testing should be made static if possible?
As far as I know, JUnit creates a new instance of the class for each test (or test method).

This does of course require that the data can be shared this way.

> InListMultiProbeTest creates 30000 DataRow objects that do not get released during suites.All run
> -------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3140
>                 URL: https://issues.apache.org/jira/browse/DERBY-3140
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>    Affects Versions: 10.4.0.0
>            Reporter: Kathey Marsden
>            Assignee: Kathey Marsden
>            Priority: Minor
>         Attachments: derby-3140_diff.txt, Snapshotinstancecounts.html
>
>
> Using jhat I noticed that there are 30000 DataRow object created by InListMultiProbeTest that do not get released after the test is complete.  This is because foreignIdToRowsMap is declared as a field in the test.  

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


[jira] Commented: (DERBY-3140) InListMultiProbeTest creates 30000 DataRow objects that do not get released during suites.All run

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536727 ] 

Kathey Marsden commented on DERBY-3140:
---------------------------------------

Kristian Waagan said:
>I guess this also means that larger data structures required for testing should be made static if >possible?
I think they should be avoided if possible and localized to the fixtures. If that is not possible they should be nulled out as proposed for InListMultiProbeTest 

>As far as I know, JUnit creates a new instance of the class for each test (or test method).

Looking at the instance snapshot attached, it looks like most of the tests have one instance for the embedded run and one for Network Server. However some tests like ClosedObjectTest (3510 instances)  have many more. I haven't looked at that test to see exactly what's going on.  I am not sure yet if we could avoid all of this with a different TestRunner which might get rid of references after the test is run.




> InListMultiProbeTest creates 30000 DataRow objects that do not get released during suites.All run
> -------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3140
>                 URL: https://issues.apache.org/jira/browse/DERBY-3140
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>    Affects Versions: 10.4.0.0
>            Reporter: Kathey Marsden
>            Assignee: Kathey Marsden
>            Priority: Minor
>         Attachments: derby-3140_diff.txt, Snapshotinstancecounts.html
>
>
> Using jhat I noticed that there are 30000 DataRow object created by InListMultiProbeTest that do not get released after the test is complete.  This is because foreignIdToRowsMap is declared as a field in the test.  

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


[jira] Closed: (DERBY-3140) InListMultiProbeTest creates 30000 DataRow objects that do not get released during suites.All run

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden closed DERBY-3140.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 10.4.0.0
                   10.3.1.5

> InListMultiProbeTest creates 30000 DataRow objects that do not get released during suites.All run
> -------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3140
>                 URL: https://issues.apache.org/jira/browse/DERBY-3140
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>    Affects Versions: 10.4.0.0
>            Reporter: Kathey Marsden
>            Assignee: Kathey Marsden
>            Priority: Minor
>             Fix For: 10.3.1.5, 10.4.0.0
>
>         Attachments: derby-3140_diff.txt, Snapshotinstancecounts.html
>
>
> Using jhat I noticed that there are 30000 DataRow object created by InListMultiProbeTest that do not get released after the test is complete.  This is because foreignIdToRowsMap is declared as a field in the test.  

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


[jira] Assigned: (DERBY-3140) InListMultiProbeTest creates 30000 DataRow objects that do not get released during suites.All run

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-3140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden reassigned DERBY-3140:
-------------------------------------

    Assignee: Kathey Marsden

> InListMultiProbeTest creates 30000 DataRow objects that do not get released during suites.All run
> -------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3140
>                 URL: https://issues.apache.org/jira/browse/DERBY-3140
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>    Affects Versions: 10.4.0.0
>            Reporter: Kathey Marsden
>            Assignee: Kathey Marsden
>            Priority: Minor
>         Attachments: Snapshotinstancecounts.html
>
>
> Using jhat I noticed that there are 30000 DataRow object created by InListMultiProbeTest that do not get released after the test is complete.  This is because foreignIdToRowsMap is declared as a field in the test.  

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


[jira] Commented: (DERBY-3140) InListMultiProbeTest creates 30000 DataRow objects that do not get released during suites.All run

Posted by "Kathey Marsden (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-3140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12536749 ] 

Kathey Marsden commented on DERBY-3140:
---------------------------------------

I found this blog that might be of interest:
http://blogs.atlassian.com/developer/2005/12/reducing_junit_memory_usage.html


> InListMultiProbeTest creates 30000 DataRow objects that do not get released during suites.All run
> -------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3140
>                 URL: https://issues.apache.org/jira/browse/DERBY-3140
>             Project: Derby
>          Issue Type: Sub-task
>          Components: Test
>    Affects Versions: 10.4.0.0
>            Reporter: Kathey Marsden
>            Assignee: Kathey Marsden
>            Priority: Minor
>             Fix For: 10.3.1.5, 10.4.0.0
>
>         Attachments: derby-3140_diff.txt, Snapshotinstancecounts.html
>
>
> Using jhat I noticed that there are 30000 DataRow object created by InListMultiProbeTest that do not get released after the test is complete.  This is because foreignIdToRowsMap is declared as a field in the test.  

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