diff --git a/dev-tools/forbidden/test-signatures.txt b/dev-tools/forbidden/test-signatures.txt index e69de29bb2d..a4d5737281e 100644 --- a/dev-tools/forbidden/test-signatures.txt +++ b/dev-tools/forbidden/test-signatures.txt @@ -0,0 +1,2 @@ + +com.carrotsearch.randomizedtesting.RandomizedTest#globalTempDir() @ Use newTempDirPath() instead diff --git a/src/test/java/org/elasticsearch/common/io/FileSystemUtilsTests.java b/src/test/java/org/elasticsearch/common/io/FileSystemUtilsTests.java index 3519bfc449b..8226360d60b 100644 --- a/src/test/java/org/elasticsearch/common/io/FileSystemUtilsTests.java +++ b/src/test/java/org/elasticsearch/common/io/FileSystemUtilsTests.java @@ -92,7 +92,7 @@ public class FileSystemUtilsTests extends ElasticsearchTestCase { @Test public void testMoveOverExistingFileAndIgnore() throws IOException { - Path dest = globalTempDirPath(); + Path dest = newTempDirPath(); FileSystemUtils.moveFilesWithoutOverwriting(src.resolve("v1"), dest, null); assertFileContent(dest, "file1.txt", "version1"); diff --git a/src/test/java/org/elasticsearch/test/ElasticsearchTestCase.java b/src/test/java/org/elasticsearch/test/ElasticsearchTestCase.java index 41fe805dbe1..9fe2f877b0b 100644 --- a/src/test/java/org/elasticsearch/test/ElasticsearchTestCase.java +++ b/src/test/java/org/elasticsearch/test/ElasticsearchTestCase.java @@ -557,13 +557,6 @@ public abstract class ElasticsearchTestCase extends AbstractRandomizedTest { public static Path newTempDirPath(LifecycleScope scope) { return newTempDir(scope).toPath(); } - - /** - * Returns 'global' temp dir (seems like a bad idea) - */ - public static Path globalTempDirPath() { - return globalTempDir().toPath(); - } /** * Returns a random number of temporary paths.