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 2015/05/03 19:47:57 UTC

logging-log4j2 git commit: Help figure out why #testFileFromUriWithPlusCharactersInName() fails in Jenkins but asserting different parts of the implementation of FileUtils#fileFromUri(URI).

Repository: logging-log4j2
Updated Branches:
  refs/heads/master dbaafcb76 -> 4d1136641


Help figure out why #testFileFromUriWithPlusCharactersInName() fails in
Jenkins but asserting different parts of the implementation of
FileUtils#fileFromUri(URI).

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

Branch: refs/heads/master
Commit: 4d113664141c34e93106318b7f8902add99d4d53
Parents: dbaafcb
Author: Gary Gregory <ga...@gmail.com>
Authored: Sun May 3 10:47:53 2015 -0700
Committer: Gary Gregory <ga...@gmail.com>
Committed: Sun May 3 10:47:53 2015 -0700

----------------------------------------------------------------------
 .../org/apache/logging/log4j/core/util/FileUtilsTest.java    | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4d113664/log4j-core/src/test/java/org/apache/logging/log4j/core/util/FileUtilsTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/util/FileUtilsTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/util/FileUtilsTest.java
index ee7f8e3..2555d88 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/util/FileUtilsTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/util/FileUtilsTest.java
@@ -20,6 +20,7 @@ package org.apache.logging.log4j.core.util;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
 import java.io.File;
@@ -42,12 +43,19 @@ public class FileUtilsTest {
         assertTrue("file exists", file.exists());
     }
 
+    /**
+     * Help figure out why {@link #testFileFromUriWithPlusCharactersInName()} fails in Jenkins but asserting different
+     * parts of the implementation of {@link FileUtils#fileFromUri(URI)}.
+     */
     @Test
     public void testFileExistsWithPlusCharactersInName() throws Exception {
         final String config = "target/test-classes/log4j+config+with+plus+characters.xml";
         final File file = new File(config);
         assertEquals("log4j+config+with+plus+characters.xml", file.getName());
         assertTrue("file exists", file.exists());
+        //
+        final URI uri = new URI(config);
+        assertNull(uri.getScheme());
     }
 
     @Test