You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2024/01/03 19:39:46 UTC

(maven-surefire) branch SUREFIRE-2229 updated (5f27699f9 -> c88b100df)

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

michaelo pushed a change to branch SUREFIRE-2229
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git


    omit 5f27699f9 [SUREFIRE-2229] [REGRESSION] SUREFIRE-2224 causes stack trace to be omitted for errors and failures
     add 96890c426 Run CI tests also with Java 21
     add 32dd601c1 Bump javassist to 3.30.2-GA
     new c88b100df [SUREFIRE-2229] [REGRESSION] SUREFIRE-2224 causes stack trace to be omitted for errors and failures

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (5f27699f9)
            \
             N -- N -- N   refs/heads/SUREFIRE-2229 (c88b100df)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/maven-verify.yml | 4 ++--
 pom.xml                            | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)


(maven-surefire) 01/01: [SUREFIRE-2229] [REGRESSION] SUREFIRE-2224 causes stack trace to be omitted for errors and failures

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch SUREFIRE-2229
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git

commit c88b100dfa897c422d657d7716336b49c6fd944e
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Wed Jan 3 16:43:34 2024 +0100

    [SUREFIRE-2229] [REGRESSION] SUREFIRE-2224 causes stack trace to be omitted for errors and failures
    
    This closes #709
---
 .../maven/plugin/surefire/report/StatelessXmlReporter.java     | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
index 043959dd5..7fb661eb5 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
@@ -432,7 +432,7 @@ public class StatelessXmlReporter implements StatelessReportEventListener<Wrappe
             boolean trimStackTrace,
             OutputStream fw,
             String testErrorType,
-            boolean enableNestedOutErrElements)
+            boolean createNestedOutErrElements)
             throws IOException {
         ppw.startElement(testErrorType);
 
@@ -456,7 +456,11 @@ public class StatelessXmlReporter implements StatelessReportEventListener<Wrappe
             }
         }
 
-        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);
@@ -464,6 +468,8 @@ public class StatelessXmlReporter implements StatelessReportEventListener<Wrappe
             ppw.endElement();
 
             createOutErrElements(outputStreamWriter, ppw, report, fw);
+        } else if (stackTrace != null) {
+            extraEscapeElementValue(stackTrace, outputStreamWriter, ppw, fw);
         }
 
         ppw.endElement(); // entry type