You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2016/09/24 06:48:35 UTC

logging-log4j2 git commit: Delete temp test file.

Repository: logging-log4j2
Updated Branches:
  refs/heads/master 60833808d -> e1902e97f


Delete temp test file.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/e1902e97
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/e1902e97
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/e1902e97

Branch: refs/heads/master
Commit: e1902e97f8fa9f1be30cf849d6f28af1887cda80
Parents: 6083380
Author: Gary Gregory <gg...@apache.org>
Authored: Fri Sep 23 23:48:30 2016 -0700
Committer: Gary Gregory <gg...@apache.org>
Committed: Fri Sep 23 23:48:30 2016 -0700

----------------------------------------------------------------------
 ...bstractLog4j1ConfigurationConverterTest.java | 25 ++++++++++----------
 1 file changed, 12 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e1902e97/log4j-1.2-api/src/test/java/org/apache/log4j/config/AbstractLog4j1ConfigurationConverterTest.java
----------------------------------------------------------------------
diff --git a/log4j-1.2-api/src/test/java/org/apache/log4j/config/AbstractLog4j1ConfigurationConverterTest.java b/log4j-1.2-api/src/test/java/org/apache/log4j/config/AbstractLog4j1ConfigurationConverterTest.java
index 86a0b36..fa4923c 100644
--- a/log4j-1.2-api/src/test/java/org/apache/log4j/config/AbstractLog4j1ConfigurationConverterTest.java
+++ b/log4j-1.2-api/src/test/java/org/apache/log4j/config/AbstractLog4j1ConfigurationConverterTest.java
@@ -1,6 +1,5 @@
 package org.apache.log4j.config;
 
-import java.io.File;
 import java.io.IOException;
 import java.nio.file.FileVisitResult;
 import java.nio.file.Files;
@@ -11,6 +10,7 @@ import java.nio.file.attribute.BasicFileAttributes;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.junit.After;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -55,20 +55,19 @@ public abstract class AbstractLog4j1ConfigurationConverterTest {
     public AbstractLog4j1ConfigurationConverterTest(final Path path) {
         super();
         this.pathIn = path;
-        File file = new File(outputFile);
-        this.pathOut = file.toPath();
+        this.pathOut = Paths.get(outputFile);
     }
 
+    @After
+    public void tearDown() throws IOException {
+        Files.deleteIfExists(pathOut);
+    }
+    
     @Test
-    public void test() throws IOException {
-        final Path tempFile = Files.createTempFile("log4j", ".xml");
-        try {
-            final Log4j1ConfigurationConverter.CommandLineArguments cla = new Log4j1ConfigurationConverter.CommandLineArguments();
-            cla.setPathIn(pathIn);
-            cla.setPathOut(tempFile);
-            Log4j1ConfigurationConverter.run(cla);
-        } finally {
-            Files.deleteIfExists(tempFile);
-        }
+    public void test() {
+        final Log4j1ConfigurationConverter.CommandLineArguments cla = new Log4j1ConfigurationConverter.CommandLineArguments();
+        cla.setPathIn(pathIn);
+        cla.setPathOut(pathOut);
+        Log4j1ConfigurationConverter.run(cla);
     }
 }