You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Tim Perry (Jira)" <ji...@apache.org> on 2021/05/28 16:01:00 UTC
[jira] [Issue Comment Deleted] (LOG4J2-3089)
JsonTemplateLayoutNullEventDelimiterTest sporadically fails on Windows
[ https://issues.apache.org/jira/browse/LOG4J2-3089?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Perry updated LOG4J2-3089:
------------------------------
Comment: was deleted
(was: >git diff
diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/PatternSelectorTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/PatternSelectorTest.java
index 61dbdd3f2..afc91aa93 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/PatternSelectorTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/PatternSelectorTest.java
@@ -63,9 +63,9 @@ public class PatternSelectorTest {
assertEquals(4, messages.size(),
"Incorrect number of messages. Expected 4, Actual " + messages.size() + ": " + messages);
String expect = "[TRACE] TestScriptPatternSelector ====== " +
*- "o.a.l.l.c.PatternSelectorTest.testScriptPatternSelector:54 Enter ======" + Strings.LINE_SEPARATOR;*
*+ "o.a.l.l.c.PatternSelectorTest.testScriptPatternSelector:57 Enter ======" + Strings.LINE_SEPARATOR;*
assertEquals(expect, messages.get(0));
*- expect = "[INFO ] TestScriptPatternSelector o.a.l.l.c.PatternSelectorTest.testScriptPatternSelector.55 " +*
*+ expect = "[INFO ] TestScriptPatternSelector o.a.l.l.c.PatternSelectorTest.testScriptPatternSelector.58 " +*
"Hello World" + Strings.LINE_SEPARATOR;
assertEquals(expect, messages.get(1));
assertEquals("[INFO ] NoLocation No location information" + Strings.LINE_SEPARATOR, messages.get(2));
@@ -86,10 +86,10 @@ public class PatternSelectorTest {
assertEquals(4, messages.size(),
"Incorrect number of messages. Expected 4, Actual " + messages.size() + ": " + messages);
String expect = "[TRACE] TestJavaScriptPatternSelector ====== " +
*- "o.a.l.l.c.PatternSelectorTest.testJavaScriptPatternSelector:76 Enter ======" + Strings.LINE_SEPARATOR;*
*+ "o.a.l.l.c.PatternSelectorTest.testJavaScriptPatternSelector:80 Enter ======" + Strings.LINE_SEPARATOR;*
assertEquals(expect, messages.get(0));
expect = "[INFO ] TestJavaScriptPatternSelector " +
*- "o.a.l.l.c.PatternSelectorTest.testJavaScriptPatternSelector.77 Hello World" + Strings.LINE_SEPARATOR;*
*+ "o.a.l.l.c.PatternSelectorTest.testJavaScriptPatternSelector.81 Hello World" + Strings.LINE_SEPARATOR;*
assertEquals(expect, messages.get(1));
assertEquals("[INFO ] JavascriptNoLocation No location information" + Strings.LINE_SEPARATOR, messages.get(2));
app.clear();)
> JsonTemplateLayoutNullEventDelimiterTest sporadically fails on Windows
> ----------------------------------------------------------------------
>
> Key: LOG4J2-3089
> URL: https://issues.apache.org/jira/browse/LOG4J2-3089
> Project: Log4j 2
> Issue Type: Bug
> Components: JsonTemplateLayout
> Affects Versions: 2.14.0, 2.14.1
> Reporter: Tim Perry
> Assignee: Volkan Yazici
> Priority: Minor
> Fix For: 3.0.0, 2.15.0
>
>
> {{JsonTemplateLayoutNullEventDelimiterTest}} sporadically fails in Windows when the port is unavailable. Ideally it would find an available port dynamically, write out the XML config to a temp file with the targeted port, run the test, and then clean up the temporary config XML file.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)