I think most of those use InMemoryAuditLogger so it's not a problem, but we can call DatabaseDescriptor.setAuditLoggingOptions to change the dir, the same way the AuditLoggerTest.testJMXArchive method does.
Kind Regards, Brandon On Mon, Aug 14, 2023 at 11:23 PM Derek Chen-Becker <de...@chen-becker.org> wrote: > > 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? > > Derek > > On Sun, Aug 13, 2023 at 3:12 PM Josh McKenzie <jmcken...@apache.org> wrote: >> >> There's also tests that hardcode >> >> I started mentally twitching when I hit that point in the sentence. >> >> Kill them with fire. >> >> On Sun, Aug 13, 2023, at 4:51 PM, Mick Semb Wever wrote: >> >> >> https://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/db/DirectoriesTest.java#L717-L719 >> https://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/db/DirectoriesTest.java#L757-L759 >> >> Can I open a ticket to track fixes for these and any other issues I run into >> while moving to using "build/tmp"? >> >> >> >> Go for it. :-) >> There's also tests that hardcode other paths that breaks the use of >> `build.dir` >> >> > > > -- > +---------------------------------------------------------------+ > | Derek Chen-Becker | > | GPG Key available at https://keybase.io/dchenbecker and | > | https://pgp.mit.edu/pks/lookup?search=derek%40chen-becker.org | > | Fngrprnt: EB8A 6480 F0A3 C8EB C1E7 7F42 AFC5 AFEE 96E4 6ACC | > +---------------------------------------------------------------+ >