Isaac Reath created CASSANDRA-20819: ---------------------------------------
Summary: ThreadLocalReadAheadBufferTest fails with FileNotFound exception when -Djava.io.tmpdir set to /tmp Key: CASSANDRA-20819 URL: https://issues.apache.org/jira/browse/CASSANDRA-20819 Project: Apache Cassandra Issue Type: Bug Components: Test/unit Reporter: Isaac Reath Assignee: Isaac Reath When running ThreadLocalReadAheadBufferTest, I found that the test will fail with the following error if -[Djava.io|http://djava.io/].tmpdir is set to any directory without a trailing slash whose parent is not writable (e.g. /tmp). This happens because when we construct the path, we simply just append tmpdir to the filename ([https://github.com/apache/cassandra/blob/trunk/test/unit/org/apache/cassandra/io/util/ThreadLocalReadAheadBufferTest.java#L180]). This produces the following error: {code:java} java.lang.RuntimeException: java.io.FileNotFoundException: /tmpdata+90912743.bin (Read-only file system) at org.apache.cassandra.io.util.ThreadLocalReadAheadBufferTest.writeFile(ThreadLocalReadAheadBufferTest.java:200) at org.apache.cassandra.io.util.ThreadLocalReadAheadBufferTest.setup(ThreadLocalR... {code} By switching to using a File(parent, filename) constructor we can support both with and without a trailing slash. -- 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