You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by mi...@apache.org on 2016/04/08 14:04:11 UTC

[19/50] logging-log4j2 git commit: LOG4J2-1343 minor test update

LOG4J2-1343 minor test update


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

Branch: refs/heads/LOG4J2-1356
Commit: 4dc2163ab67ec2105869dcd9cf39d06c6cc7b35e
Parents: ef0023a
Author: rpopma <rp...@apache.org>
Authored: Thu Apr 7 03:08:03 2016 +0900
Committer: rpopma <rp...@apache.org>
Committed: Thu Apr 7 03:08:03 2016 +0900

----------------------------------------------------------------------
 .../MemoryMappedFileAppenderLocationTest.java         | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/4dc2163a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppenderLocationTest.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppenderLocationTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppenderLocationTest.java
index 113abab..8f2c4b7 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppenderLocationTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/MemoryMappedFileAppenderLocationTest.java
@@ -36,7 +36,7 @@ import static org.junit.Assert.*;
  * Tests that logged strings and their location appear in the file,
  * that the file size is the next power of two of the specified mapped region length
  * and that the file is shrunk to its actual usage when done.
- * 
+ *
  * @since 2.1
  */
 public class MemoryMappedFileAppenderLocationTest {
@@ -45,7 +45,7 @@ public class MemoryMappedFileAppenderLocationTest {
 
     @Before
     public void before() {
-        System.setProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY, 
+        System.setProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY,
                 "MemoryMappedFileAppenderLocationTest.xml");
     }
 
@@ -53,19 +53,19 @@ public class MemoryMappedFileAppenderLocationTest {
     public void testMemMapLocation() throws Exception {
         final File f = new File(LOGFILE);
         if (f.exists()) {
-            assertTrue(f.delete());
+            assertTrue("deleted ok", f.delete());
         }
         assertTrue(!f.exists());
-        
+
         final int expectedFileLength = Integers.ceilingNextPowerOfTwo(32000);
         assertEquals(32768, expectedFileLength);
-        
+
         final Logger log = LogManager.getLogger();
         try {
             log.warn("Test log1");
             assertTrue(f.exists());
             assertEquals("initial length", expectedFileLength, f.length());
-            
+
             log.warn("Test log2");
             assertEquals("not grown", expectedFileLength, f.length());
         } finally {
@@ -73,7 +73,7 @@ public class MemoryMappedFileAppenderLocationTest {
         }
         final int LINESEP = System.lineSeparator().length();
         assertEquals("Shrunk to actual used size", 474 + 2 * LINESEP, f.length());
-        
+
         String line1, line2, line3;
         try (final BufferedReader reader = new BufferedReader(new FileReader(LOGFILE))) {
             line1 = reader.readLine();