mirror of https://github.com/apache/druid.git
fix IndexTaskTest tmp dir
- Create local firehose files in a clean temp directory to avoid firehose reading other random temp files that start with 'druid'
This commit is contained in:
parent
016d07fda3
commit
092dfe0309
|
@ -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