Discussion:
Heads up: needing to explicitly set surefire's trimStackTrace with Tycho 1.2
(too old to reply)
Brian de Alwis
2018-06-14 03:21:19 UTC
Permalink
Since updating to Tycho 1.2, we noticed that our error stacktraces from failing tests were abbreviated. We're now explicitly setting surefire's `trimStackTrace=false`. I spent an hour or two trying to track down a what seemed to be an odd NPE as the actual site was trimmed.

What's odd is that although Tycho 1.2 updated surefire from 2.17 to 2.19.1, the trimStackTrace setting, and its default to true, dates back to surefire 2.2. I'm not sure what resulted in the change!

Brian.
Brian de Alwis
2018-06-14 04:17:37 UTC
Permalink
Oops, I posted this prematurely — tycho-surefire doesn't propagate the trimStackTrace.
testGetAffectedFiles_null(com.google.cloud.tools.eclipse.util.io.ResourceUtilsTest) Time elapsed: 0.002 sec <<< ERROR!
java.lang.NullPointerException
at com.google.cloud.tools.eclipse.util.io.ResourceUtilsTest.testGetAffectedFiles_null(ResourceUtilsTest.java:70)
testGetAffectedFiles_null(com.google.cloud.tools.eclipse.util.io.ResourceUtilsTest) Time elapsed: 0.001 sec <<< ERROR!
java.lang.NullPointerException: null
at com.google.cloud.tools.eclipse.util.io.ResourceUtils.getAffectedFiles(ResourceUtils.java:61)
at com.google.cloud.tools.eclipse.util.io.ResourceUtilsTest.testGetAffectedFiles_null(ResourceUtilsTest.java:70)
So the NPE is reported at the wrong spot!

I'm not sure if this is caused by a change of value in trimStackTrace or whether surefire 2.19.1's trimming is more aggressive than 2.17.

Brian.
Since updating to Tycho 1.2, we noticed that our error stacktraces from failing tests were abbreviated. We're now explicitly setting surefire's `trimStackTrace=false`. I spent an hour or two trying to track down a what seemed to be an odd NPE as the actual site was trimmed.
What's odd is that although Tycho 1.2 updated surefire from 2.17 to 2.19.1, the trimStackTrace setting, and its default to true, dates back to surefire 2.2. I'm not sure what resulted in the change!
Brian.
Continue reading on narkive:
Loading...