sonatype/nexus — pull request #137 by velo (2011-12-08 20:51:29+00:00)
Title: Nexus 4691 progress listener npe

I added some extra checks on ProgressListener and got more accurate logs
https://builds.sonatype.org/view/nexus/job/nexus-oss-its-feature/jdk=java-6x,label=linux/107/consoleFull
{code}
Caused by: java.lang.NullPointerException
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:187)
at org.sonatype.nexus.integrationtests.report.ProgressListener.showResult(ProgressListener.java:80)
at org.sonatype.nexus.integrationtests.report.ProgressListener.onTestFailure(ProgressListener.java:57)
at org.testng.internal.Invoker.runTestListeners(Invoker.java:1823)
{code}

ProgressListener.java:80 : https://github.com/sonatype/nexus/commit/3036e7d47ecd67c27c396b0f106a23fe60b6eb2c#L0R80
That mean System.out == null

I can change ProgressListener to ignore that, but why did it got null in the first place?

TestNG nature will skip @Test if any exception happens on @Before* and that happen on NEXUS383. Once that happen, testNG start skipping, but it doesn't skip Nexus4520PlexusPrefixedVariablesArePickedUpIT.restoreOut()

I will change it to not set out if null, but this can happen again if any future test sets System.out to null. At least now it is easier to track.