Skip to content

Commit 0110c23

Browse files
committed
Fix failing log4j-taglib tests
1 parent b2e31f8 commit 0110c23

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

log4j-taglib/src/test/java/org/apache/logging/log4j/taglib/CatchingTagTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public void testDoEndTag() throws Exception {
5454
this.tag.setException(new Exception("This is a test."));
5555

5656
assertEquals("The return value is not correct.", Tag.EVAL_PAGE, this.tag.doEndTag());
57-
verify("Catching ERROR M-CATCHING[ EXCEPTION ] E java.lang.Exception: This is a test.");
57+
verify("Catching ERROR M-CATCHING[ EXCEPTION ] Ejava.lang.Exception: This is a test.");
5858
}
5959

6060
@Test
@@ -63,7 +63,7 @@ public void testDoEndTagLevelString() throws Exception {
6363
this.tag.setException(new RuntimeException("This is another test."));
6464

6565
assertEquals("The return value is not correct.", Tag.EVAL_PAGE, this.tag.doEndTag());
66-
verify("Catching INFO M-CATCHING[ EXCEPTION ] E java.lang.RuntimeException: This is another test.");
66+
verify("Catching INFO M-CATCHING[ EXCEPTION ] Ejava.lang.RuntimeException: This is another test.");
6767
}
6868

6969
@Test
@@ -72,7 +72,7 @@ public void testDoEndTagLevelObject() throws Exception {
7272
this.tag.setException(new Error("This is the last test."));
7373

7474
assertEquals("The return value is not correct.", Tag.EVAL_PAGE, this.tag.doEndTag());
75-
verify("Catching WARN M-CATCHING[ EXCEPTION ] E java.lang.Error: This is the last test.");
75+
verify("Catching WARN M-CATCHING[ EXCEPTION ] Ejava.lang.Error: This is the last test.");
7676
}
7777

7878
private void verify(final String expected) {

log4j-taglib/src/test/java/org/apache/logging/log4j/taglib/LoggingMessageTagSupportTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public void testDoEndTagStringMessageNoMarkerException() throws Exception {
137137

138138
assertEquals("The return value is not correct.", Tag.EVAL_PAGE, this.tag.doEndTag());
139139
verify(
140-
"Another message for testDoEndTagStringMessageNoMarkerException ERROR M- E java.lang.Exception: This is a test"
140+
"Another message for testDoEndTagStringMessageNoMarkerException ERROR M- Ejava.lang.Exception: This is a test"
141141
+ Strings.LINE_SEPARATOR);
142142
}
143143

@@ -151,7 +151,7 @@ public void testDoEndTagStringMessageMarkerException() throws Exception {
151151

152152
assertEquals("The return value is not correct.", Tag.EVAL_PAGE, this.tag.doEndTag());
153153
verify(
154-
"Final message for testDoEndTagStringMessageMarkerException TRACE M-F02 E java.lang.RuntimeException: This is another test"
154+
"Final message for testDoEndTagStringMessageMarkerException TRACE M-F02 Ejava.lang.RuntimeException: This is another test"
155155
+ Strings.LINE_SEPARATOR);
156156
}
157157

@@ -178,7 +178,7 @@ public void testDoEndTagStringWithParametersMarkerAndException() throws Exceptio
178178
this.tag.setMessage("Final message with [{}] parameter of [{}]");
179179

180180
assertEquals("The return value is not correct.", Tag.EVAL_PAGE, this.tag.doEndTag());
181-
verify("Final message with [Z] parameter of [SECONDS] DEBUG M-N03 E java.lang.Error: This is the last test"
181+
verify("Final message with [Z] parameter of [SECONDS] DEBUG M-N03 Ejava.lang.Error: This is the last test"
182182
+ Strings.LINE_SEPARATOR);
183183
}
184184

@@ -214,7 +214,7 @@ public void testDoEndTagMessageNoMarkerException() throws Exception {
214214
logger.getMessageFactory().newMessage("Third message for testDoEndTagMessageNoMarkerException"));
215215

216216
assertEquals("The return value is not correct.", Tag.EVAL_PAGE, this.tag.doEndTag());
217-
verify("Third message for testDoEndTagMessageNoMarkerException TRACE M- E java.lang.Exception: This is a test"
217+
verify("Third message for testDoEndTagMessageNoMarkerException TRACE M- Ejava.lang.Exception: This is a test"
218218
+ Strings.LINE_SEPARATOR);
219219
}
220220

@@ -228,7 +228,7 @@ public void testDoEndTagMessageMarkerException() throws Exception {
228228
logger.getMessageFactory().newMessage("Final message for testDoEndTagMessageMarkerException"));
229229

230230
assertEquals("The return value is not correct.", Tag.EVAL_PAGE, this.tag.doEndTag());
231-
verify("Final message for testDoEndTagMessageMarkerException ERROR M-F02 E java.lang.RuntimeException: "
231+
verify("Final message for testDoEndTagMessageMarkerException ERROR M-F02 Ejava.lang.RuntimeException: "
232232
+ "This is another test" + Strings.LINE_SEPARATOR);
233233
}
234234

@@ -261,7 +261,7 @@ public void testDoEndTagObjectNoMarkerException() throws Exception {
261261
this.tag.setMessage(new MyMessage("Third message for testDoEndTagObjectNoMarkerException"));
262262

263263
assertEquals("The return value is not correct.", Tag.EVAL_PAGE, this.tag.doEndTag());
264-
verify("Third message for testDoEndTagObjectNoMarkerException TRACE M- E java.lang.Exception: This is a test"
264+
verify("Third message for testDoEndTagObjectNoMarkerException TRACE M- Ejava.lang.Exception: This is a test"
265265
+ Strings.LINE_SEPARATOR);
266266
}
267267

@@ -274,7 +274,7 @@ public void testDoEndTagObjectMarkerException() throws Exception {
274274
this.tag.setMessage(new MyMessage("Final message for testDoEndTagObjectMarkerException"));
275275

276276
assertEquals("The return value is not correct.", Tag.EVAL_PAGE, this.tag.doEndTag());
277-
verify("Final message for testDoEndTagObjectMarkerException ERROR M-F02 E java.lang.RuntimeException: "
277+
verify("Final message for testDoEndTagObjectMarkerException ERROR M-F02 Ejava.lang.RuntimeException: "
278278
+ "This is another test" + Strings.LINE_SEPARATOR);
279279
}
280280

0 commit comments

Comments
 (0)