You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jesse Glick (JIRA)" <ji...@apache.org> on 2016/08/17 17:00:32 UTC
[jira] [Commented] (SUREFIRE-1226) Surefire trims all stack trace
elements except those in the test that failed
[ https://issues.apache.org/jira/browse/SUREFIRE-1226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15424904#comment-15424904 ]
Jesse Glick commented on SUREFIRE-1226:
---------------------------------------
[~tibor17] I agree with [~jlocker@redhat.com]’s expectation. Was unpleasantly surprised to update to 2.19.1 (so as to pick up SUREFIRE-1138) and finding test output like
{code:none}
java.lang.NullPointerException
at jenkins.plugins.git.AbstractGitSCMSourceTest.fileAt(AbstractGitSCMSourceTest.java:89)
at jenkins.plugins.git.AbstractGitSCMSourceTest.retrieveRevision(AbstractGitSCMSourceTest.java:76)
{code}
(nonsensical since line 89 of the test could not possibly throw this exception!) where before I had gotten
{code:none}
java.lang.NullPointerException
at jenkins.plugins.git.AbstractGitSCMSource.resolveGitTool(AbstractGitSCMSource.java:157)
at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:269)
at jenkins.scm.api.SCMSource.retrieve(SCMSource.java:295)
at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:358)
at jenkins.scm.api.SCMSource.fetch(SCMSource.java:277)
at jenkins.plugins.git.AbstractGitSCMSourceTest.fileAt(AbstractGitSCMSourceTest.java:89)
at jenkins.plugins.git.AbstractGitSCMSourceTest.retrieveRevision(AbstractGitSCMSourceTest.java:76)
{code}
which clearly indicates the problem.
If you are going to trim stack frames inside the test (which I do not advise), you need to leave *some* clue to users, so they do not have to spend an hour bisecting and searching bug trackers! For example
{code:none}
java.lang.NullPointerException
…5 stack frames elided, set trimStackTrace=false to display
at jenkins.plugins.git.AbstractGitSCMSourceTest.fileAt(AbstractGitSCMSourceTest.java:89)
at jenkins.plugins.git.AbstractGitSCMSourceTest.retrieveRevision(AbstractGitSCMSourceTest.java:76)
{code}
> Surefire trims all stack trace elements except those in the test that failed
> ----------------------------------------------------------------------------
>
> Key: SUREFIRE-1226
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1226
> Project: Maven Surefire
> Issue Type: Bug
> Components: Maven Surefire Plugin
> Affects Versions: 2.19
> Reporter: Jiri Locker
> Assignee: Tibor Digana
> Priority: Minor
> Attachments: mvn_stacktrace.tar.gz
>
>
> This looks like a re-occurrence of SUREFIRE-992 but now the stack trace is even more trimmed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)