I had planned on submitting some patches that replaced direct directory references with uses of the JUnit rule TemporaryFolder. I noticed in Confluence under "How to Contribute" that it has the recommendation:
"By default, do not let tests write any temporary files to /tmp. Instead, the tests should write to the location specified by the test.build.data system property". 1. This is an external dependency (both on the system property and potentially the directory itself. “Unit tests should fail only if there’s a bug in the system under test” 1. This isn’t reliable, since ZooKeeper has it’s own system property build.test.data which is used during some tests 1. This means that any IDE running tests would have to set this system property to safely run the tests 1. Many of the tests include cleanup code (either before running or after… it isn’t consistent) In the long run I'm looking for ways to make concurrently executing tests safe. Automating the use of disposable directories that are automatically cleaned up to avoid collisions between tests seems like a great answer.