You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rg...@apache.org on 2021/12/18 23:02:13 UTC

[logging-log4j2] 02/05: Fix test failures on long lines.

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

rgoers pushed a commit to branch log4j-2.12
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git

commit f9f2d00e01ad5ffe1cefd9c043f0da1ca56cd599
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Tue Dec 14 10:03:58 2021 -0500

    Fix test failures on long lines.
---
 .../java/org/apache/logging/log4j/core/layout/YamlLayoutTest.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/YamlLayoutTest.java b/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/YamlLayoutTest.java
index 2fef8de..69a7803 100644
--- a/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/YamlLayoutTest.java
+++ b/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/YamlLayoutTest.java
@@ -309,13 +309,13 @@ public class YamlLayoutTest {
                 .setIncludeStacktrace(false)
                 .setAdditionalFields(new KeyValuePair[] {
                     new KeyValuePair("KEY1", "VALUE1"),
-                    new KeyValuePair("KEY2", "${java:runtime}"), })
+                    new KeyValuePair("KEY2", "${java:hw}"), })
                 .setCharset(StandardCharsets.UTF_8)
                 .setConfiguration(ctx.getConfiguration())
                 .build();
         final String str = layout.toSerializable(LogEventFixtures.createLogEvent());
         assertTrue(str, str.contains("KEY1: \"VALUE1\""));
-        assertTrue(str, str.contains("KEY2: \"" + new JavaLookup().getRuntime() + "\""));
+        assertTrue(str, str.contains("KEY2: \"" + new JavaLookup().getHardware() + "\""));
     }
 
     @Test