Skip to content

Commit

Permalink
Merge pull request apache#1592 from metamx/clean-test-files
Browse files Browse the repository at this point in the history
clean temporary files
  • Loading branch information
drcrallen committed Aug 3, 2015
2 parents 5478b5b + 2679efe commit 1ddaa3f
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,24 @@
import io.druid.tasklogs.TaskLogs;
import org.apache.commons.io.FileUtils;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;

import java.io.File;
import java.io.IOException;
import java.util.Map;
import org.junit.rules.TemporaryFolder;

public class FileTaskLogsTest
{

@Rule
public TemporaryFolder temporaryFolder = new TemporaryFolder();

@Test
public void testSimple() throws Exception
{
final File tmpDir = Files.createTempDir();
final File tmpDir = temporaryFolder.newFolder();
try {
final File logDir = new File(tmpDir, "druid/logs");
final File logFile = new File(tmpDir, "log");
Expand All @@ -59,7 +65,7 @@ public void testSimple() throws Exception
@Test
public void testPushTaskLogDirCreationFails() throws Exception
{
final File tmpDir = Files.createTempDir();
final File tmpDir = temporaryFolder.newFolder();

try {
IOException thrown = null;
Expand Down

0 comments on commit 1ddaa3f

Please sign in to comment.