diff --git a/testing/trino-tests/src/test/java/io/trino/memory/TestMemoryManager.java b/testing/trino-tests/src/test/java/io/trino/memory/TestMemoryManager.java index cc37342472ab..0b644bb74de8 100644 --- a/testing/trino-tests/src/test/java/io/trino/memory/TestMemoryManager.java +++ b/testing/trino-tests/src/test/java/io/trino/memory/TestMemoryManager.java @@ -48,6 +48,7 @@ import static io.trino.spi.StandardErrorCode.CLUSTER_OUT_OF_MEMORY; import static io.trino.testing.TestingSession.testSessionBuilder; import static io.trino.testing.assertions.Assert.assertEventually; +import static java.util.UUID.randomUUID; import static java.util.concurrent.Executors.newCachedThreadPool; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static org.assertj.core.api.Assertions.assertThat; @@ -326,7 +327,7 @@ public void testQueryTotalMemoryLimit() // The user memory enforcement is tested in testQueryTotalMemoryLimit(). // Total memory = user memory + revocable memory. .put("spill-enabled", "true") - .put("spiller-spill-path", Paths.get(System.getProperty("java.io.tmpdir"), "trino", "spills").toString()) + .put("spiller-spill-path", Paths.get(System.getProperty("java.io.tmpdir"), "trino", "spills", randomUUID().toString()).toString()) .put("spiller-max-used-space-threshold", "1.0") .buildOrThrow(); try (QueryRunner queryRunner = createQueryRunner(SESSION, properties)) { diff --git a/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedSpilledQueries.java b/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedSpilledQueries.java index c61df33dbab3..3036cbbda357 100644 --- a/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedSpilledQueries.java +++ b/testing/trino-tests/src/test/java/io/trino/tests/TestDistributedSpilledQueries.java @@ -25,6 +25,7 @@ import static io.trino.plugin.tpch.TpchMetadata.TINY_SCHEMA_NAME; import static io.trino.testing.TestingSession.testSessionBuilder; +import static java.util.UUID.randomUUID; import static org.assertj.core.api.Assertions.assertThat; public class TestDistributedSpilledQueries @@ -49,7 +50,7 @@ public static DistributedQueryRunner createSpillingQueryRunner() .build(); ImmutableMap extraProperties = ImmutableMap.builder() - .put("spiller-spill-path", Paths.get(System.getProperty("java.io.tmpdir"), "trino", "spills").toString()) + .put("spiller-spill-path", Paths.get(System.getProperty("java.io.tmpdir"), "trino", "spills", randomUUID().toString()).toString()) .put("spiller-max-used-space-threshold", "1.0") .put("memory-revoking-threshold", "0.0") // revoke always .put("memory-revoking-target", "0.0")