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 2019/08/07 19:55:54 UTC

[logging-log4j2] branch release-2.x updated: [LOG4J2-2658] Make test OS independent.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git


The following commit(s) were added to refs/heads/release-2.x by this push:
     new e5503d7  [LOG4J2-2658] Make test OS independent.
e5503d7 is described below

commit e5503d7f9f0f8059c1c83e028a54ec7d84ea112c
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Aug 7 15:55:49 2019 -0400

    [LOG4J2-2658] Make test OS independent.
---
 .../appender/rolling/action/AbstractActionTest.java | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/action/AbstractActionTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/action/AbstractActionTest.java
index 17333d3..a1c3d21 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/action/AbstractActionTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/rolling/action/AbstractActionTest.java
@@ -16,6 +16,12 @@
  */
 package org.apache.logging.log4j.core.appender.rolling.action;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.io.IOException;
+import java.util.List;
+
 import org.apache.logging.log4j.Level;
 import org.apache.logging.log4j.junit.StatusLoggerRule;
 import org.apache.logging.log4j.status.StatusData;
@@ -23,12 +29,6 @@ import org.apache.logging.log4j.status.StatusLogger;
 import org.junit.Rule;
 import org.junit.Test;
 
-import java.io.IOException;
-import java.util.List;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
 public class AbstractActionTest {
 
     @Rule
@@ -45,10 +45,11 @@ public class AbstractActionTest {
         StatusData statusData = statusDataList.get(0);
         assertEquals(Level.WARN, statusData.getLevel());
         String formattedMessage = statusData.getFormattedStatus();
-        assertTrue(formattedMessage.contains("Exception reported by action 'class org.apache." +
-                "logging.log4j.core.appender.rolling.action.AbstractActionTest$TestAction' java.io.IOException: " +
-                "failed\n\tat org.apache.logging.log4j.core.appender.rolling.action.AbstractActionTest" +
-                "$TestAction.execute(AbstractActionTest.java:"));
+        assertTrue(formattedMessage, formattedMessage.contains("Exception reported by action 'class org.apache."
+                + "logging.log4j.core.appender.rolling.action.AbstractActionTest$TestAction' java.io.IOException: "
+                + "failed" + System.lineSeparator()
+                + "\tat org.apache.logging.log4j.core.appender.rolling.action.AbstractActionTest"
+                + "$TestAction.execute(AbstractActionTest.java:"));
     }
 
     @Test