Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

Fix temp dir usage in ZkCLI test

Uwe Schindler5c672e14f80c
diff --git a/solr/core/src/test/org/apache/solr/cloud/ZkCLITest.java b/solr/core/src/test/org/apache/solr/cloud/ZkCLITest.java
index d1521a0d399..4cadf87585e 100644
--- a/solr/core/src/test/org/apache/solr/cloud/ZkCLITest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/ZkCLITest.java
@@ -301,10 +301,9 @@ public class ZkCLITest extends SolrTestCaseJ4 {
@Test
public void testGetFileNotExists() throws Exception {
- File tmpDir = createTempDir().toFile();
String getNode = "/getFileNotExistsNode";
- File file = File.createTempFile("newfile", null, tmpDir);
+ File file = createTempFile("newfile", null).toFile();
String[] args = new String[] {"-zkhost", zkServer.getZkAddress(), "-cmd",
"getfile", getNode, file.getAbsolutePath()};
try {