maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stig Rohde Døssing (JIRA) <>
Subject [jira] [Commented] (SUREFIRE-1226) Surefire trims all stack trace elements except those in the test that failed
Date Sat, 30 Sep 2017 15:10:04 GMT


Stig Rohde Døssing commented on SUREFIRE-1226:

[~tibor17]  I'm more or less repeating what [~jglick] said, but []'s expectation
for trimStackTrace seems much more reasonable to me than the new behavior. The post-2.19 behavior
makes test output misleading in some cases, and makes trimStackTrace much less useful, especially
when the trimmed stack trace doesn't indicate that it's been trimmed. 

In 2.18.1 I get the following trace with trimStackTrace enabled when I cause an NPE in my
testCommitSuccessWithOffsetVoids(org.apache.storm.kafka.spout.KafkaSpoutCommitTest)  Time
elapsed: 0.425 sec  <<< ERROR!
java.lang.NullPointerException: null
	at org.apache.storm.kafka.spout.KafkaSpout.commit(
	at org.apache.storm.kafka.spout.KafkaSpout.nextTuple(
	at org.apache.storm.kafka.spout.KafkaSpoutCommitTest.testCommitSuccessWithOffsetVoids(
This is short (no Surefirebooter or JUnit runner lines) but still perfectly describes where
the error occured. Since 2.19 trimStackTrace behavior has changed to produce the following
testCommitSuccessWithOffsetVoids(org.apache.storm.kafka.spout.KafkaSpoutCommitTest)  Time
elapsed: 0.713 sec  <<< ERROR!
	at org.apache.storm.kafka.spout.KafkaSpoutCommitTest.testCommitSuccessWithOffsetVoids(
which is much less useful. Not only does it now look like the NPE happened in L87 of the test,
which causes me to have to double check that there are no nulls in that line, but I also can't
tell which part of nextTuple may have thrown the exception. In order to debug this I either
have to blindly look around nextTuple to see if I can figure it out, or I have to disable
trimStackTrace and live with all the extra lines in my stack traces.

> Surefire trims all stack trace elements except those in the test that failed
> ----------------------------------------------------------------------------
>                 Key: SUREFIRE-1226
>                 URL:
>             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

This message was sent by Atlassian JIRA

View raw message