mirror of https://github.com/apache/cassandra
Fix ThreadLocalReadAheadBufferTest to avoid FileNotFoundException when -Djava.io.tmpdir set to /tmp
patch by Isaac Reath; reviewed by Paulo Motta, Stefan Miklosovic for CASSANDRA-20819
This commit is contained in:
parent
902ef57fa3
commit
170bf57eac
|
|
@ -177,13 +177,13 @@ public class ThreadLocalReadAheadBufferTest implements WithQuickTheories
|
|||
|
||||
private static File writeFile(int seed, int length)
|
||||
{
|
||||
String fileName = JAVA_IO_TMPDIR.getString() + "data+" + length + ".bin";
|
||||
String fileName = "data+" + length + ".bin";
|
||||
|
||||
byte[] dataChunk = new byte[4096 * 8];
|
||||
java.util.Random random = new Random(seed);
|
||||
int writtenData = 0;
|
||||
|
||||
File file = new File(fileName);
|
||||
File file = new File(JAVA_IO_TMPDIR.getString(), fileName);
|
||||
try (FileOutputStream fos = new FileOutputStream(file.toJavaIOFile()))
|
||||
{
|
||||
while (writtenData < length)
|
||||
|
|
|
|||
Loading…
Reference in New Issue