From cb195bd96e31a54eb95a16b94019a07a31f39f6d Mon Sep 17 00:00:00 2001 From: Michael Sokolov Date: Fri, 23 Jun 2023 08:38:06 -0400 Subject: [PATCH] github-12386: set java.io.tmpdir in replicator tests' forked processes (#12387) --- .../org/apache/lucene/replicator/nrt/TestNRTReplication.java | 1 + .../apache/lucene/replicator/nrt/TestStressNRTReplication.java | 1 + 2 files changed, 2 insertions(+) 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());