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

Sylvestor George edited comment on CASSANDRA-9293 at 6/25/15 6:33 PM:
----------------------------------------------------------------------

I have implemented one of the possible solutions which first counts leak 
detected in the logs @BeforeClass. I then added another @Test which counts and 
compares the leaks with the before counts and fails if the count is more after.

The changes are in the attached file 9293.txt

Please let me know if this looks like a good solution.

Sylvestor


was (Author: sylvestor88):
I have implemented one of the possible solutions which first counts leaks 
detected in the logs @BeforeClass. I then added another @Test which counts and 
compares the leaks with the before counts and fails if the count is more after.

The changes are in the attached file 9293.txt

Please let me know if this looks like a good solution.

Sylvestor

> Unit tests should fail if any LEAK DETECTED errors are printed
> --------------------------------------------------------------
>
>                 Key: CASSANDRA-9293
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9293
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Benedict
>            Assignee: Sylvestor George
>              Labels: test
>         Attachments: 9293.txt
>
>
> We shouldn't depend on dtests to inform us of these problems (which have 
> error log monitoring) - they should be caught by unit tests, which may also 
> cover different failure conditions (besides being faster).
> There are a couple of ways we could do this, but probably the easiest is to 
> add a static flag that is set to true if we ever see a leak (in Ref), and to 
> just assert that this is false at the end of every test.
> [~enigmacurry] is this something TE can help with?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to