lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dawid Weiss (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-4252) Detect/Fail tests when they leak RAM in static fields
Date Wed, 25 Jul 2012 20:48:35 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-4252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13422596#comment-13422596
] 

Dawid Weiss commented on LUCENE-4252:
-------------------------------------

bq.  I didnt want to make all test stacktraces longer though 

I honestly don't think this is such a big issue -- stack traces are for inspecting what went
wrong; if something did you look at it top-to-bottom anyway. Some people are uncomfortable
seing a long stack trace (or a nested one); we can apply some filtering to them but I'd say
let's just keep them verbose. Better show more than needed than hide what's important.

bq. with my idea to catch static initializers.

I looked at the patch but I didn't see where this idea went; perhaps I missed something. Anyway,
not important for now, I'll revisit after I'm back home.
                
> Detect/Fail tests when they leak RAM in static fields
> -----------------------------------------------------
>
>                 Key: LUCENE-4252
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4252
>             Project: Lucene - Core
>          Issue Type: Test
>          Components: general/test
>            Reporter: Robert Muir
>            Assignee: Dawid Weiss
>         Attachments: LUCENE-4252.patch, LUCENE-4252.patch
>
>
> We run our junit tests without firing up a JVM each time.
> But some tests initialize lots of stuff in @BeforeClass and don't properly null it out
in an @AfterClass, which can cause a subsequent test in the same JVM to OOM, which is difficult
to debug.
> Inspiration for this was me committing Mike's cool TestPostingsFormat, which forgot to
do this: then we were seeing OOMs in several jenkins runs.
> We should try to detect these leaks in LuceneTestCase with RAMUsageEstimator and fail
the test.

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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message