Skip to content

Commit

Permalink
[SUREFIRE-2229] [REGRESSION] SUREFIRE-2224 causes stack trace to be o…
Browse files Browse the repository at this point in the history
…mitted for errors and failures

This closes #709
  • Loading branch information
michael-o committed Jan 4, 2024
1 parent f83b883 commit e750760
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ private static void getTestProblems(
boolean trimStackTrace,
OutputStream fw,
String testErrorType,
boolean enableNestedOutErrElements)
boolean createNestedOutErrElements)
throws IOException {
ppw.startElement(testErrorType);

Expand All @@ -456,14 +456,20 @@ private static void getTestProblems(
}
}

if (enableNestedOutErrElements) {
/* This structure is inconsistent due to bad legacy design choices for the XML schema.
* Ideally, all elements would be complex and strackTrace would have its own element.
* See SUREFIRE-2230 for details to how improve and unify the schema in the future.
*/
if (createNestedOutErrElements) {
ppw.startElement("stackTrace");
if (stackTrace != null) {
extraEscapeElementValue(stackTrace, outputStreamWriter, ppw, fw);
}
ppw.endElement();

createOutErrElements(outputStreamWriter, ppw, report, fw);
} else if (stackTrace != null) {
extraEscapeElementValue(stackTrace, outputStreamWriter, ppw, fw);
}

ppw.endElement(); // entry type
Expand Down

0 comments on commit e750760

Please sign in to comment.