You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Brandon Williams (JIRA)" <ji...@apache.org> on 2014/09/13 21:10:34 UTC

[jira] [Comment Edited] (CASSANDRA-7712) temporary files need to be cleaned by unit tests

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

Brandon Williams edited comment on CASSANDRA-7712 at 9/13/14 7:10 PM:
----------------------------------------------------------------------

Quick digging seems to indicate the correct way to handle this would be to call deleteOnExit in an @After method.  Junit isn't shutting the jvm down uncleanly, just failing the test out.


was (Author: brandon.williams):
Quick digging seems to indicate the correct way to handle this would be to call deleteOnExit in an @After method.

> temporary files need to be cleaned by unit tests
> ------------------------------------------------
>
>                 Key: CASSANDRA-7712
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7712
>             Project: Cassandra
>          Issue Type: Test
>          Components: Tests
>            Reporter: Michael Shuler
>            Priority: Minor
>              Labels: lhf
>             Fix For: 2.0.11
>
>
> There are many unit test temporary files left behind after test runs. In the case of CI servers, I have seen >70,000 files accumulate in /tmp over a period of time. Each unit test should make an effort to remove its temporary files when the test is completed.
> My current unit test cleanup block:
> {noformat}
> # clean up after unit tests..
> rm -rf  /tmp/140*-0 /tmp/CFWith* /tmp/Counter1* /tmp/DescriptorTest* /tmp/Keyspace1* \
>         /tmp/KeyStreamingTransferTestSpace* /tmp/SSTableExportTest* /tmp/SSTableImportTest* \
>         /tmp/Standard1* /tmp/Statistics.db* /tmp/StreamingTransferTest* /tmp/ValuesWithQuotes* \
>         /tmp/cassandra* /tmp/jna-* /tmp/ks-cf-ib-1-* /tmp/lengthtest* /tmp/liblz4-java*.so /tmp/readtest* \
>         /tmp/set_length_during_read_mode* /tmp/set_negative_length* /tmp/snappy-*.so
> {noformat}



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