mirror of https://github.com/apache/druid.git
Merge pull request #964 from metamx/fix-index-task-tmpdir
fix IndexTaskTest temp dir
This commit is contained in:
commit
e7222c6429
|
@ -20,6 +20,7 @@
|
|||
package io.druid.indexing.common.task;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.io.Files;
|
||||
import com.metamx.common.Granularity;
|
||||
import io.druid.data.input.impl.CSVParseSpec;
|
||||
import io.druid.data.input.impl.DimensionsSpec;
|
||||
|
@ -57,7 +58,10 @@ public class IndexTaskTest
|
|||
@Test
|
||||
public void testDeterminePartitions() throws Exception
|
||||
{
|
||||
File tmpFile = File.createTempFile("druid", "index");
|
||||
File tmpDir = Files.createTempDir();
|
||||
tmpDir.deleteOnExit();
|
||||
|
||||
File tmpFile = File.createTempFile("druid", "index", tmpDir);
|
||||
tmpFile.deleteOnExit();
|
||||
|
||||
PrintWriter writer = new PrintWriter(tmpFile);
|
||||
|
@ -97,7 +101,7 @@ public class IndexTaskTest
|
|||
),
|
||||
new IndexTask.IndexIOConfig(
|
||||
new LocalFirehoseFactory(
|
||||
tmpFile.getParentFile(),
|
||||
tmpDir,
|
||||
"druid*",
|
||||
null
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue