o bunch more patches from Igor to keep the heap down. junit is just not letting go.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@774515 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2009-05-13 20:27:13 +00:00
parent 2e08d8136a
commit de46f2a5fa
15 changed files with 96 additions and 17 deletions

View File

@ -65,7 +65,7 @@ END SNIPPET: ant-bootstrap -->
<property name="maven.assembly" location="apache-maven/target/${maven.home.basename.expected}-bin.zip"/>
<property name="maven.repo.local" value="${user.home}/.m2/repository"/>
<property name="maven.debug" value="-e"/>
<property name="maven.test.skip" value="true"/> <!-- TODO: Change this default back to false once we're done -->
<property name="maven.test.skip" value="false"/> <!-- TODO: Change this default back to false once we're done -->
<property name="surefire.useFile" value="true"/>
<echo>maven.home = ${maven.home.effective}</echo>
<echo>maven.repo.local = ${maven.repo.local}</echo>
@ -199,6 +199,8 @@ END SNIPPET: ant-bootstrap -->
<classpath refid="maven.classpath"/>
<arg value="${maven.debug}"/>
<arg value="-B"/>
<arg value="-X"/>
<arg value="-e"/>
<arg value="clean"/>
<arg value="install"/>
<arg value="-Dmaven.test.skip=${maven.test.skip}"/>

View File

@ -73,6 +73,13 @@ public class DefaultWagonManagerTest
artifactFactory = (ArtifactFactory) lookup( ArtifactFactory.ROLE );
}
@Override
protected void tearDown() throws Exception {
wagonManager = null;
artifactFactory = null;
super.tearDown();
}
public void testAvailableProtocols()
throws Exception
{

View File

@ -61,6 +61,13 @@ public class ArtifactResolverTest
projectArtifact = createLocalArtifact( "project", "3.0" );
}
@Override
protected void tearDown() throws Exception {
artifactFactory = null;
projectArtifact = null;
super.tearDown();
}
@Override
protected String component()

View File

@ -78,6 +78,13 @@ public class DefaultArtifactCollectorTest
projectArtifact = createArtifactSpec( "project", "1.0", null );
}
@Override
protected void tearDown() throws Exception {
artifactCollector = null;
artifactFactory = null;
super.tearDown();
}
// works, but we don't fail on cycles presently
public void disabledtestCircularDependencyNotIncludingCurrentProject()
throws ArtifactResolutionException, InvalidVersionSpecificationException

View File

@ -37,6 +37,13 @@ public abstract class AbstractCoreMavenComponentTestCase
projectBuilder = lookup( MavenProjectBuilder.class );
}
@Override
protected void tearDown() throws Exception {
repositorySystem = null;
projectBuilder = null;
super.tearDown();
}
abstract protected String getProjectsDirectory();
protected File getProject( String name )

View File

@ -25,6 +25,14 @@ public class MavenTest
maven = lookup( Maven.class );
exceptionHandler = lookup( ExceptionHandler.class );
}
@Override
protected void tearDown() throws Exception {
maven = null;
exceptionHandler = null;
super.tearDown();
}
protected String getProjectsDirectory()
{

View File

@ -27,6 +27,12 @@ public class LifecycleExecutorTest
lifecycleExecutor = (DefaultLifecycleExecutor) lookup( LifecycleExecutor.class );
lookup( ExceptionHandler.class );
}
@Override
protected void tearDown() throws Exception {
lifecycleExecutor = null;
super.tearDown();
}
protected String getProjectsDirectory()
{

View File

@ -22,6 +22,12 @@ public class PluginManagerTest
super.setUp();
pluginManager = lookup( PluginManager.class );
}
@Override
protected void tearDown() throws Exception {
pluginManager = null;
super.tearDown();
}
protected String getProjectsDirectory()
{

View File

@ -70,6 +70,12 @@ public class PluginParameterExpressionEvaluatorTest
factory = lookup( ArtifactFactory.class );
}
@Override
protected void tearDown() throws Exception {
factory = null;
super.tearDown();
}
public void testPluginDescriptorExpressionReference()
throws Exception
{

View File

@ -55,6 +55,13 @@ public abstract class AbstractMavenProjectTestCase
projectBuilder = lookup( MavenProjectBuilder.class );
}
}
@Override
protected void tearDown() throws Exception {
projectBuilder = null;
super.tearDown();
}
@Override
protected void tearDown()

View File

@ -68,6 +68,13 @@ public class PomConstructionTest
super.tearDown();
}
@Override
protected void tearDown() throws Exception {
mavenProjectBuilder = null;
super.tearDown();
}
/**
* Will throw exception if url is empty. MNG-4050

View File

@ -19,22 +19,6 @@ package org.apache.maven.project.artifact;
* under the License.
*/
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.ArtifactUtils;
import org.apache.maven.artifact.factory.ArtifactFactory;
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
import org.apache.maven.model.Dependency;
import org.apache.maven.model.DependencyManagement;
import org.apache.maven.model.Exclusion;
import org.apache.maven.model.Model;
import org.apache.maven.project.MavenProject;
import org.apache.maven.repository.RepositorySystem;
import org.codehaus.plexus.PlexusTestCase;
@ -50,6 +34,12 @@ public class MavenMetadataSourceTest
repositorySystem = lookup( RepositorySystem.class );
}
@Override
protected void tearDown() throws Exception {
repositorySystem = null;
super.tearDown();
}
public void testShouldNotCarryExclusionsOverFromDependencyToDependency()
throws Exception
{

View File

@ -39,6 +39,13 @@ public class PomConstructionWithSettingsTest
testDirectory = new File( getBasedir(), BASE_POM_DIR );
mavenProjectBuilder = (DefaultMavenProjectBuilder) lookup( MavenProjectBuilder.class );
}
@Override
protected void tearDown() throws Exception {
mavenProjectBuilder = null;
super.tearDown();
}
public void testSettingsNoPom() throws Exception
{

View File

@ -18,6 +18,12 @@ public class DefaultMavenExecutionRequestPopulatorTest
populator = (MavenExecutionRequestPopulator) lookup( MavenExecutionRequestPopulator.class );
}
@Override
protected void tearDown() throws Exception {
populator = null;
super.tearDown();
}
public void testWagonManagerOfflineFlagIsPopulatedFromSettings()
throws MavenEmbedderException

View File

@ -17,6 +17,12 @@ public class MirrorProcessorTest
mirrorBuilder.clearMirrors();
}
@Override
protected void tearDown() throws Exception {
mirrorBuilder = null;
super.tearDown();
}
public void testAddMirrorWithNullRepositoryId()
{
mirrorBuilder.addMirror( null, "test", "http://www.nowhere.com/" );