You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2022/01/28 08:20:31 UTC

[GitHub] [maven-surefire] sman-81 opened a new pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

sman-81 opened a new pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452


   Pull request for ticket [SUREFIRE-1992] which removes abbreviation of test error/failure messages to 78 characters in two classes that write test results to stdout/stderr.
   The fix greatly improves usability of surefire when troubleshooting test failures.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] sman-81 edited a comment on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
sman-81 edited a comment on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1024310461


   > we should add instruction to readme ...
   
   that would be helpful
   
   @Tibor17 My latest commit limits error/failure messages to first line. Also added a new test.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] sman-81 commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
sman-81 commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1029907889


   Hi @Tibor17
   
   > It can be done easily. Since I am using IntelliJ IDEA, ...
   
   I'm OK using command line. Good practice :)
   
   > 1 length of 80 characters
   > 
   > 2 printing the first line
   > 
   > 3 the improvements with additional exception to catch.
   
   This PR is now limited to point 1 above.
   
   Two new pull requests are `sman-81-SUREFIRE-1992-2` for point 2 and `sman-81-SUREFIRE-1992-3` for point 3.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] sman-81 commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
sman-81 commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1033614005


   > @sman-81 Thx for contributing.
   
   my pleasure, it was fun


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] sman-81 commented on a change in pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
sman-81 commented on a change in pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#discussion_r794514561



##########
File path: surefire-api/src/main/java/org/apache/maven/surefire/api/report/LegacyPojoStackTraceWriter.java
##########
@@ -81,10 +79,15 @@ public String smartTrimmedStackTrace()
         result.append( "#" );
         result.append( testMethod );
         SafeThrowable throwable = getThrowable();
+        final String excClassName = throwable.getTarget().getClass().getName();
         if ( throwable.getTarget() instanceof AssertionError )
+        if ( throwable.getTarget() instanceof AssertionError

Review comment:
       unintentional. I'll amend the PR




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#discussion_r794516788



##########
File path: surefire-api/src/main/java/org/apache/maven/surefire/api/report/LegacyPojoStackTraceWriter.java
##########
@@ -93,7 +96,7 @@ public String smartTrimmedStackTrace()
             {
                 result.append( " " );
                 result.append( target.getClass().getSimpleName() );
-                result.append( getTruncatedMessage( throwable.getMessage(), MAX_LINE_LENGTH - result.length() ) );
+                result.append( throwable.getMessage() );

Review comment:
       Again missing the null check.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#discussion_r794536083



##########
File path: surefire-api/src/main/java/org/apache/maven/surefire/api/report/LegacyPojoStackTraceWriter.java
##########
@@ -81,10 +79,15 @@ public String smartTrimmedStackTrace()
         result.append( "#" );
         result.append( testMethod );
         SafeThrowable throwable = getThrowable();
+        final String excClassName = throwable.getTarget().getClass().getName();
         if ( throwable.getTarget() instanceof AssertionError )
+        if ( throwable.getTarget() instanceof AssertionError

Review comment:
       @sman-81 
   I am not sure why the author of `smartTrimmedStackTrace()` ignores other exceptions. Try to open a new PR and try to turn the IF statement to:
   `if ( throwable.getTarget() != null )`
   I want to know if the old code makes strong sense to the tests.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] sman-81 commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
sman-81 commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1024430602


   ## re: IDE Setup
   
   In Eclipse, right-click on project -> Maven -> Select Maven Profiles ..., pick `ide-development`
   
   Despite this still 194 errors.
   
   Eclipse keeps building in an endless loop. CPU usage is high.
   
   A major source of errors is missing `GroupMatcherParser` which gets generated into 
   `surefire-grouper/target/generated-sources/javacc/org/apache/maven/surefire/group/parse/GroupMatcherParser.java` (in Eclipse)
   Thus this source is not part of any source folder.
   
   The POM relies on `org.codehaus.mojo:javacc-maven-plugin`. This plugin is ancient ... We should consider moving to `org.javacc.plugin:javacc-maven-plugin` and placing generated sources in a different location. Maybe `build-helper-maven-plugin` can help in a solution.
   
   Anyways, any pointers how to set up in Eclipse are welcome.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1029856808


   @sman-81
   It can be done easily. Since I am using IntelliJ IDEA, I know that I can create new branches and then I can go to the particular branch and select a history of the old branch `sman-81-SUREFIRE-1992` and press right button and select `Cherry-Pick` and push it in the newly created branch, then open the PR from the branch. The same with next branch. I do not have Eclipse installed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 edited a comment on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 edited a comment on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1028641664


   @slawekjaranowski
   I have to trigger the CI for this PR as well. Why it happens?
   The other PRs run automatically.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#discussion_r794518079



##########
File path: surefire-api/src/main/java/org/apache/maven/surefire/api/report/LegacyPojoStackTraceWriter.java
##########
@@ -81,10 +79,15 @@ public String smartTrimmedStackTrace()
         result.append( "#" );
         result.append( testMethod );
         SafeThrowable throwable = getThrowable();
+        final String excClassName = throwable.getTarget().getClass().getName();

Review comment:
       Hint: try to use Java 1.8 `Optional`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] sman-81 commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
sman-81 commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1028214184


   I'm new to this project.
   After a very vibrant and produktive discussion, which ultimately led to a better, team-agreed solution, there is **silence**.
   The CI does not continue checking this PR but remains in **cancelled** state.
   Could someone enlighten me how things **work** around here?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] sman-81 commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
sman-81 commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1028628637


   @slawekjaranowski
   
   Thanks for triggering the re-run. Test `org.apache.maven.surefire.its.CheckTestNgVersionsIT` crashed in `Verify / macOS-latest jdk-17-temurin`.
   I didn't think this is related to the code change however.
   What to do in this case?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] sman-81 edited a comment on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
sman-81 edited a comment on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1028214184


   I'm new to this project.
   After a very vibrant and produktive discussion, which ultimately led to a better, team-agreed solution, there is **silence**.
   The CI does not continue checking this PR but remains in **cancelled** state.
   Can the CI be triggered again? I meant to ask


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1028641664


   @slawekjaranowski
   I have trigger the CI for this PR. Why it happens?
   The other PRs run automatically.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 edited a comment on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 edited a comment on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1028632974


   @sman-81 
   I think you have made a great job.
   I can see several improvements you have made so far and they should split in more PRs. These are namely:
   1. length of 80 characters 
   2. printing the first line
   3. the improvements with additional exception to catch.
   Would you please fork this work in several PRs?
   Thx


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] sman-81 commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
sman-81 commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1024864526


   @Tibor17 
   
   > @sman-81 I can confirm [the plugin](https://repo1.maven.org/maven2/org/javacc/plugin/javacc-maven-plugin/3.0.3/) was maintained in 2020 and 2021. The Codehaus plugin was last time released in 2009. Feel free to open a new PR regarding the new plugin as a substitute of codehaus plugin.
   
   I will look into it. If we are lucky the successor is a drop-in replacement. Codehaus has beeen defunct for quite some time afaik.
   
   When will the automatic checks of this pull request continue? The status has been: `1 successful, 3 cancelled, and 9 queued checks` 🤔


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 merged pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 merged pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 edited a comment on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 edited a comment on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1028632974


   @sman-81 
   I think you have made a great job.
   I can see several improvements you have made so far and they should split in more PRs. These are namely:
   1. length of 80 characters 
   2. printing the first line
   3. the improvements with additional exception to catch.
   
   Would you please fork this work in several PRs? Thx


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1024326337


   @sman-81 
   yes, we will add it to README.
   Let's wait fo the CI.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] sman-81 commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
sman-81 commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1024310461


   > we should add instruction to readme ...
   that would be helpful
   
   @Tibor17 My latest commit limits error/failure messages to first line. Also added a new test.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] sman-81 commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
sman-81 commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1029049081


   @Tibor17
   
   > Would you please fork this work in several PRs? Thx
   
   I don't know how to do this.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] sman-81 commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
sman-81 commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1025693708


   What's holding up the CI?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] sman-81 commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
sman-81 commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1024261368


   Thanks for your feedback!
   I couldn't get the project to compile in Eclipse, but should have at least built it with Maven on the command line.
   The latest commit should address all the issues you raised with my pr.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1030824538


   @sman-81 
   Now this commit looks much better. Since the other branches/PRs have the same Jira id, it has confused me.
   Let's concentrate on this and see the CI result...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] sman-81 commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
sman-81 commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1032999872


   ![gitmerge](https://user-images.githubusercontent.com/1314640/153064469-281cdcd0-c042-4431-ae94-b7f825ae14b3.gif)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#discussion_r794513496



##########
File path: surefire-api/src/main/java/org/apache/maven/surefire/api/report/LegacyPojoStackTraceWriter.java
##########
@@ -81,10 +79,15 @@ public String smartTrimmedStackTrace()
         result.append( "#" );
         result.append( testMethod );
         SafeThrowable throwable = getThrowable();
+        final String excClassName = throwable.getTarget().getClass().getName();
         if ( throwable.getTarget() instanceof AssertionError )
+        if ( throwable.getTarget() instanceof AssertionError

Review comment:
       This section of code is suited for another Jira ticket.
   The way we split the fix purpose we can better separate commits per issue in the git history.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#discussion_r794544268



##########
File path: surefire-api/src/main/java/org/apache/maven/surefire/api/report/LegacyPojoStackTraceWriter.java
##########
@@ -81,10 +79,15 @@ public String smartTrimmedStackTrace()
         result.append( "#" );
         result.append( testMethod );
         SafeThrowable throwable = getThrowable();
+        final String excClassName = throwable.getTarget().getClass().getName();
         if ( throwable.getTarget() instanceof AssertionError )
+        if ( throwable.getTarget() instanceof AssertionError

Review comment:
       The exception message may have multiple lines. They may produce a huge report on the console. My advice is to print only the first line if exists.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1024280276


   @sman-81 
   Enable the profile `ide-development` and install the module `surefire-shared-utils` and reimport the project in your IDE. Then you can run the tests in the IDE and compile.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] sman-81 commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
sman-81 commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1024877644


   Issue SUREFIRE-1994: Upgrade and configure javacc-maven-plugin created.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#discussion_r794516311



##########
File path: surefire-api/src/main/java/org/apache/maven/surefire/api/report/LegacyPojoStackTraceWriter.java
##########
@@ -81,10 +79,15 @@ public String smartTrimmedStackTrace()
         result.append( "#" );
         result.append( testMethod );
         SafeThrowable throwable = getThrowable();
+        final String excClassName = throwable.getTarget().getClass().getName();
         if ( throwable.getTarget() instanceof AssertionError )
+        if ( throwable.getTarget() instanceof AssertionError
+                || "junit.framework.AssertionFailedError".equals( excClassName )
+                || "junit.framework.ComparisonFailure".equals( excClassName )
+                || excClassName.startsWith( "org.opentest4j." ) )
         {
             result.append( " " );
-            result.append( getTruncatedMessage( throwable.getMessage(), MAX_LINE_LENGTH - result.length() ) );
+            result.append( throwable.getMessage() );

Review comment:
       See the previous code.
   Why you did not see `null` in the console log?
   You are missing the null check here!




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#discussion_r794516999



##########
File path: surefire-providers/common-java5/src/main/java/org/apache/maven/surefire/report/SmartStackTraceParser.java
##########
@@ -149,7 +147,7 @@ public String getString()
             result.append( rootIsInclass() ? " " : " » " )
                     .append( toMinimalThrowableMiniMessage( excType ) );
 
-            result.append( truncateMessage( msg, MAX_LINE_LENGTH - result.length() ) );
+            result.append( msg );

Review comment:
       null check




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1028632974


   @sman-81 
   I think you have made a great job.
   I can see several improvements you have made and they should split in PRs. These are namely:
   1. length of 80 characters 
   2. printing the first line
   3. the improvements with additional exception to catch.
   Would you please fork this work in several PRs?
   Thx


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] slawekjaranowski commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1028889177


   Last build was hanging ... I rerun also ... I will not investigate why .. sometime some of build hang on GH. 
   For first time contributor maintainer must approve build.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] slawekjaranowski commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
slawekjaranowski commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1024283894


   we should add instruction to readme ...


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1024732489


   @sman-81 
   I can confirm [the plugin](https://repo1.maven.org/maven2/org/javacc/plugin/javacc-maven-plugin/3.0.3/) was maintained in 2020 and 2021. The Codehaus plugin was last time released in 2009.
   Feel free to open a new PR regarding the new plugin as a substitute of codehaus plugin.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#discussion_r794487726



##########
File path: surefire-api/src/main/java/org/apache/maven/surefire/api/report/LegacyPojoStackTraceWriter.java
##########
@@ -81,10 +79,15 @@ public String smartTrimmedStackTrace()
         result.append( "#" );
         result.append( testMethod );
         SafeThrowable throwable = getThrowable();
+        final String excClassName = throwable.getTarget().getClass().getName();
         if ( throwable.getTarget() instanceof AssertionError )
+        if ( throwable.getTarget() instanceof AssertionError

Review comment:
       This `if ( ... )` is a pure trojan horse.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1028630901


   @sman-81 
   We investigated ugly issue where the CI randomly failed. This was very important and so the outcome is last few commits.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 edited a comment on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 edited a comment on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1028641664


   @slawekjaranowski
   I have to trigger the CI for this PR as well. Why it happens?
   The other PRs are run automatically.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#discussion_r794528075



##########
File path: surefire-api/src/main/java/org/apache/maven/surefire/api/report/LegacyPojoStackTraceWriter.java
##########
@@ -81,10 +79,15 @@ public String smartTrimmedStackTrace()
         result.append( "#" );
         result.append( testMethod );
         SafeThrowable throwable = getThrowable();
+        final String excClassName = throwable.getTarget().getClass().getName();
         if ( throwable.getTarget() instanceof AssertionError )
+        if ( throwable.getTarget() instanceof AssertionError

Review comment:
       Feel free to open a new Jira and PR with acceptance of asserions exceptions.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on a change in pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#discussion_r794513922



##########
File path: surefire-api/src/main/java/org/apache/maven/surefire/api/report/LegacyPojoStackTraceWriter.java
##########
@@ -81,10 +79,15 @@ public String smartTrimmedStackTrace()
         result.append( "#" );
         result.append( testMethod );
         SafeThrowable throwable = getThrowable();
+        final String excClassName = throwable.getTarget().getClass().getName();

Review comment:
       This may throw NPE.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-surefire] Tibor17 commented on pull request #452: [SUREFIRE-1992] - Do not abbreviate test error/failure messages to 78 characters

Posted by GitBox <gi...@apache.org>.
Tibor17 commented on pull request #452:
URL: https://github.com/apache/maven-surefire/pull/452#issuecomment-1033135649


   @sman-81 
   Thx for contributing.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org