From 5ff7367fb094ece6825dbb1c7ba9b8dc05c17b59 Mon Sep 17 00:00:00 2001 From: John Dennis Casey Date: Fri, 28 Mar 2008 23:38:08 +0000 Subject: [PATCH] Enable the ITs for mng-2339 and some minor fixes to tests for mng-3221. git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@642434 13f79535-47bb-0310-9956-ffa450edef68 --- .../IntegrationTestSuite.java | 1 + .../MavenITmng3221InfiniteForking.java | 72 ++++++++++++++----- 2 files changed, 54 insertions(+), 19 deletions(-) diff --git a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java index c7aa98233e..df69ec2236 100644 --- a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java +++ b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/IntegrationTestSuite.java @@ -85,6 +85,7 @@ public class IntegrationTestSuite suite.addTestSuite( MavenITmng2972OverridePluginDependency.class ); suite.addTestSuite( MavenITmng2861RelocationsAndRanges.class ); suite.addTestSuite( MavenITmng2744checksumVerificationTest.class ); + suite.addTestSuite( MavenITmng2339BadProjectInterpolationTest.class ); suite.addTestSuite( MavenITmng2277AggregatorAndResolutionPluginsTest.class ); suite.addTestSuite( MavenITmng2254PomEncodingTest.class ); suite.addTestSuite( MavenITmng2234ActiveProfilesFromSettingsTest.class ); diff --git a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3221InfiniteForking.java b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3221InfiniteForking.java index 41970af6ea..310f355d7d 100644 --- a/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3221InfiniteForking.java +++ b/its/core-integration-tests/src/test/java/org/apache/maven/integrationtests/MavenITmng3221InfiniteForking.java @@ -23,18 +23,35 @@ public class MavenITmng3221InfiniteForking File reportDir = new File( testDir, "report" ); File projectDir = new File( testDir, "user" ); - Verifier verifier; + Verifier verifier = null; - verifier = new Verifier( reportDir.getAbsolutePath() ); - verifier.executeGoal( "install" ); - verifier.verifyErrorFreeLog(); - verifier.resetStreams(); + try + { + verifier = new Verifier( reportDir.getAbsolutePath() ); - verifier = new Verifier( projectDir.getAbsolutePath() ); - verifier.executeGoal( "site" ); - verifier.verifyErrorFreeLog(); - verifier.resetStreams(); - } + verifier.deleteArtifact( "tests", "maven-forking-report-plugin", "1", "jar" ); + + verifier.executeGoal( "install" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + + verifier = new Verifier( projectDir.getAbsolutePath() ); + verifier.executeGoal( "site" ); + verifier.verifyErrorFreeLog(); + } + finally + { + if ( verifier != null ) + { + verifier.resetStreams(); + } + + File logFile = new File( projectDir, "log.txt" ); + File logFileBackup = new File( projectDir, "mng-3221-a-log.txt" ); + + logFile.renameTo( logFileBackup ); + } + } public void testitMNG3221b() throws Exception @@ -44,16 +61,33 @@ public class MavenITmng3221InfiniteForking File pluginDir = new File( testDir, "plugin" ); File projectDir = new File( testDir, "user" ); - Verifier verifier; + Verifier verifier = null; - verifier = new Verifier( pluginDir.getAbsolutePath() ); - verifier.executeGoal( "install" ); - verifier.verifyErrorFreeLog(); - verifier.resetStreams(); + try + { + verifier = new Verifier( pluginDir.getAbsolutePath() ); - verifier = new Verifier( projectDir.getAbsolutePath() ); - verifier.executeGoal( "package" ); - verifier.verifyErrorFreeLog(); - verifier.resetStreams(); + verifier.deleteArtifact( "tests", "maven-forking-test-plugin", "1", "jar" ); + + verifier.executeGoal( "install" ); + verifier.verifyErrorFreeLog(); + verifier.resetStreams(); + + verifier = new Verifier( projectDir.getAbsolutePath() ); + verifier.executeGoal( "package" ); + verifier.verifyErrorFreeLog(); + } + finally + { + if ( verifier != null ) + { + verifier.resetStreams(); + } + + File logFile = new File( projectDir, "log.txt" ); + File logFileBackup = new File( projectDir, "mng-3221-b-log.txt" ); + + logFile.renameTo( logFileBackup ); + } } }