[jira] [Commented] (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=14365690#comment-14365690 ] Michael Shuler commented on CASSANDRA-7712: --- A couple suggestions were attempted as workarounds, but all the unit test data was still written to /tmp/ {noformat} (trunk)mshuler@hana:~/git/cassandra$ export TMPDIR=`pwd`/testdata (trunk)mshuler@hana:~/git/cassandra$ ant test -Djava.io.tmpdir=`pwd`/testdata ... {noformat} > 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: bootcamp, lhf > Fix For: 2.0.14 > > Attachments: 7712-hung-CliTest_system.log.gz, 7712-v2.txt, > 7712-v3.txt, CASSANDRA-7712_apache_cassandra_2.0.txt > > > 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)
[jira] [Commented] (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=14184126#comment-14184126 ] Jonathan Ellis commented on CASSANDRA-7712: --- Good to commit? > 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: bootcamp, lhf > Fix For: 2.0.12 > > Attachments: 7712-hung-CliTest_system.log.gz, 7712-v2.txt, > 7712-v3.txt, CASSANDRA-7712_apache_cassandra_2.0.txt > > > 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)
[jira] [Commented] (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=14174262#comment-14174262 ] Michael Shuler commented on CASSANDRA-7712: --- cassandra-2.0 ant test = BUILD SUCCESSFUL lgtm! > 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: bootcamp, lhf > Fix For: 2.0.11 > > Attachments: 7712-hung-CliTest_system.log.gz, 7712-v2.txt, > 7712-v3.txt, CASSANDRA-7712_apache_cassandra_2.0.txt > > > 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)
[jira] [Commented] (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=14133028#comment-14133028 ] Brandon Williams commented on CASSANDRA-7712: - We can't change FU.deleteWithConfirm like this without impacting other non-test parts of the code where it _should_ throw. But deleteRecursive is pretty simple and could have a version used inside a test util class, though it looks like this is localized to SchemaLoader. Also your IDE did some import re-writing that violate the code style. > 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 > > Attachments: CASSANDRA-7712_apache_cassandra_2.0.txt > > > 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)
[jira] [Commented] (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 commented on CASSANDRA-7712: - 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)
[jira] [Commented] (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=14132883#comment-14132883 ] Tyler Hobbs commented on CASSANDRA-7712: We already call {{File.deleteOnExit()}} on these files. I'm guessing that in some test failure scenarios (maybe test timeout?) the JVM doesn't have a clean shutdown, so this is never run. > 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)