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

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


The following commit(s) were added to refs/heads/2.x by this push:
     new 8ab73854f0 Fix `XmlLayouTest`
8ab73854f0 is described below

commit 8ab73854f0321591ba33e1039b04f227f6ccf169
Author: Volkan Yazıcı <[email protected]>
AuthorDate: Tue Jun 18 12:52:21 2024 +0200

    Fix `XmlLayouTest`
---
 .../test/java/org/apache/logging/log4j/core/layout/XmlLayoutTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/layout/XmlLayoutTest.java
 
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/layout/XmlLayoutTest.java
index 27ef3b3d21..7831643f61 100644
--- 
a/log4j-core-test/src/test/java/org/apache/logging/log4j/core/layout/XmlLayoutTest.java
+++ 
b/log4j-core-test/src/test/java/org/apache/logging/log4j/core/layout/XmlLayoutTest.java
@@ -150,8 +150,8 @@ public class XmlLayoutTest {
         final String str = layout.toSerializable(expected);
         // System.out.println(str);
         assertEquals(str, !compact, str.contains("\n"));
-        assertEquals(str, includeSource, str.contains("Source"));
-        assertEquals(str, includeContext, str.contains("ContextMap"));
+        assertEquals(str, includeSource, str.contains("<Source"));
+        assertEquals(str, includeContext, str.contains("<ContextMap"));
         final Log4jLogEvent actual = new Log4jXmlObjectMapper().readValue(str, 
Log4jLogEvent.class);
         LogEventFixtures.assertEqualLogEvents(expected, actual, includeSource, 
includeContext, includeStacktrace);
         if (includeContext) {

Reply via email to