[
https://issues.apache.org/jira/browse/LOG4J2-3089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17352762#comment-17352762
]
Tim Perry commented on LOG4J2-3089:
-----------------------------------
Volkan, On master, I'm getting the errors like the following building core.
It looks like some line numbers need to be updated. I included the diff of
the fix below. Should I create a pull request for this? Or do you want to
just make the changes? --Tim
[ERROR] Failures:
[ERROR] PatternSelectorTest.testJavaScriptPatternSelector:90 expected:
<[TRACE] TestJavaScriptPatternSelector ======
o.a.l.l.c.PatternSelectorTest.testJavaScriptPatternSelector:76 Enter ======
o.a.l.l.c.PatternSelectorTest.testJavaScriptPatternSelector:80 Enter ======
[ERROR] PatternSelectorTest.testScriptPatternSelector:67 expected:
<[TRACE] TestScriptPatternSelector ======
o.a.l.l.c.PatternSelectorTest.testScriptPatternSelector:54 Enter ======
o.a.l.l.c.PatternSelectorTest.testScriptPatternSelector:57 Enter ======
C:\verifylog4j\logging-log4j2>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();
On Thu, May 27, 2021 at 1:25 AM Volkan Yazici (Jira) <[email protected]>
wrote:
> 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)