[
https://issues.apache.org/jira/browse/CASSANDRA-19672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17933896#comment-17933896
]
Stefan Miklosovic commented on CASSANDRA-19672:
-----------------------------------------------
There is more "idiomatic" way to set properties as spotted by [~isaacreath]
like this
{code:java}
try (WithProperties ignore = new WithProperties().set(LOG_DIR,
tmpDir.toString())) { ... } {code}
WithProperties implements AutoCloseable and that will unset the properties back
regardless of whether it fails or not.
[https://github.com/instaclustr/cassandra/commit/ae9f10ad876d2e7a2f5b846f4e08590cbd7a9b06]
I am running CI as I write this, on successful build I merge that as [~paulo]
seems to be OK with it already.
> 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: [email protected]
For additional commands, e-mail: [email protected]