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

Derek Chen-Becker commented on CASSANDRA-18750:
-----------------------------------------------

I think I'm 98% done with the needed changes (or at least a first pass; I'm 
sure I'll get feedback), but I've hit an issue with AuditLoggerTest. While 
AuditLogOptions has a String property for "audit_logs_dir", the test calls 
StorageService.enableAuditLogs throught the test methods, and that method does 
not take a parameter for the log directory. As a result, the AuditLogOptions 
instance that is created always uses the default audit log directory, which 
just happens to be the "audit" subdirectory of the project root. This is 
getting into territory I'm not that familiar with, but it seems like there 
might be three ways to fix this:

1. Write a new overload of StorageService.enableAuditLog that takes an 
AuditLogOptions and delegate the other overloads to it
2. Add a new overload that also takes a Path or File pointing to the audit log 
directory
3. Set the "cassandra.logdir.audit" property in the ant build, similar to 
"tmp.dir"/"java.io.tmpdir"

Thoughts?

> Make unit tests compatible with the tmp.dir property
> ----------------------------------------------------
>
>                 Key: CASSANDRA-18750
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18750
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Derek Chen-Becker
>            Assignee: Derek Chen-Becker
>            Priority: Normal
>
> Several unit tests hard-code file paths under the "/tmp" directory, which 
> means they do not honor the {{tmp.dir}} ant build property. These should be 
> updated so that when the user specifies {{tmp.dir}}, they can be certain that 
> any files or directories created by the unit tests will be in their specified 
> location.



--
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

Reply via email to