mirror of https://github.com/apache/maven.git
Ensure verifier resets streams if an exception is thrown when obtaining the Maven version, otherwise the error is consumed.
git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@548787 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3488007e24
commit
9ab1fd9c6e
|
@ -33,11 +33,23 @@ public class IntegrationTestSuite
|
||||||
|
|
||||||
public static Test suite() throws VerificationException
|
public static Test suite() throws VerificationException
|
||||||
{
|
{
|
||||||
String mavenVersion = new Verifier( "" ).getMavenVersion();
|
Verifier verifier = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
verifier = new Verifier( "" );
|
||||||
|
String mavenVersion = verifier.getMavenVersion();
|
||||||
|
|
||||||
out.println( "Running integration tests for Maven " + mavenVersion );
|
out.println( "Running integration tests for Maven " + mavenVersion );
|
||||||
|
|
||||||
System.setProperty( "maven.version", mavenVersion );
|
System.setProperty( "maven.version", mavenVersion );
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
if ( verifier != null )
|
||||||
|
{
|
||||||
|
verifier.resetStreams();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TestSuite suite = new TestSuite();
|
TestSuite suite = new TestSuite();
|
||||||
suite.addTestSuite( MavenIT0000Test.class );
|
suite.addTestSuite( MavenIT0000Test.class );
|
||||||
|
|
Loading…
Reference in New Issue