[ https://issues.apache.org/jira/browse/CASSANDRA-19672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17929257#comment-17929257 ]
Isaac Reath commented on CASSANDRA-19672: ----------------------------------------- Thank you for the patch! I ran into this recently and was happy to find there was already a fix. I took a look at this PR and it looks good to me. Only one minor comment would be to move the [LOG_DIR.setString() |https://github.com/apache/cassandra/blob/2bef437bc4ca1e4d189664d28fd2137be0e1b782/test/unit/org/apache/cassandra/tools/CompactionStressTest.java#L47] and [LOG_DIR.clearValue()|https://github.com/apache/cassandra/blob/2bef437bc4ca1e4d189664d28fd2137be0e1b782/test/unit/org/apache/cassandra/tools/CompactionStressTest.java#L75] into a test fixture so that we always clear the value regardless of what happens in the test run. That said LOG_DIR doesn’t look to be used in other tests so it’s probably fine to leave as-is. Running all of the unit tests with this patch locally succeeds and I’m no longer finding these extra files getting created. +1 (nb). > some unit tests should generate files in the tmp directory > ---------------------------------------------------------- > > Key: CASSANDRA-19672 > URL: https://issues.apache.org/jira/browse/CASSANDRA-19672 > Project: Apache Cassandra > Issue Type: Improvement > Components: Test/unit > Reporter: Ling Mao > Assignee: Ling Mao > Priority: Normal > Fix For: 5.x > > Time Spent: 10m > Remaining Estimate: 0h > > I run "{*}_ant test_{*}" to fire the whole test suit cases in my local > machine, and found some UTs had generated files in current directory, > otherwise the tmp directory. > > {code:java} > [root@vm-24-5-centos cassandra]# git status > # audit/ > # compaction.log > # > import_cql_test_keyspace_table_testcopyonlythoserowsthatmatchvectortyp_04.err > {code} > > These problematic UTs are > > {code:java} > ant testsome > -Dtest.name=org.apache.cassandra.service.StorageServiceServerTest > -Dtest.methods=testAuditLogEnableLoggerNotFound > ant testsome > -Dtest.name=org.apache.cassandra.service.StorageServiceServerTest > -Dtest.methods=testAuditLogEnableLoggerTransitions > ant testsome -Dtest.name=org.apache.cassandra.tools.CompactionStressTest > -Dtest.methods=testWriteAndCompact > ant testsome -Dtest.name=org.apache.cassandra.tools.cqlsh.CqlshTest > -Dtest.methods=testCopyOnlyThoseRowsThatMatchVectorTypeSize > {code} > > The patch is aimed to generate files in the tmp directory to fix it. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org