diff --git a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/TestNRTReplication.java b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/TestNRTReplication.java index 2af7a68bdb6..e530652817b 100644 --- a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/TestNRTReplication.java +++ b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/TestNRTReplication.java @@ -104,6 +104,7 @@ public class TestNRTReplication extends LuceneTestCase { long seed = random().nextLong() * nodeStartCounter.incrementAndGet(); cmd.add("-Dtests.seed=" + SeedUtils.formatSeed(seed)); cmd.add("-ea"); + cmd.add("-Djava.io.tmpdir=" + childTempDir.toFile()); cmd.addAll(getJvmForkArguments()); diff --git a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/TestStressNRTReplication.java b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/TestStressNRTReplication.java index c2e6c5d89fc..f1480c6ffb8 100644 --- a/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/TestStressNRTReplication.java +++ b/lucene/replicator/src/test/org/apache/lucene/replicator/nrt/TestStressNRTReplication.java @@ -608,6 +608,7 @@ public class TestStressNRTReplication extends LuceneTestCase { long seed = random().nextLong() * nodeStartCounter.incrementAndGet(); cmd.add("-Dtests.seed=" + SeedUtils.formatSeed(seed)); cmd.add("-ea"); + cmd.add("-Djava.io.tmpdir=" + childTempDir.toFile()); cmd.addAll(getJvmForkArguments()); cmd.add("org.junit.runner.JUnitCore"); cmd.add(TestSimpleServer.class.getName());