aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules
diff options
context:
space:
mode:
authorskygo <skygo@unknown>2012-08-07 22:06:47 +0000
committerskygo <skygo@unknown>2012-08-07 22:06:47 +0000
commit8be9f7b74606d958721cc69f8f065404bd0b3a76 (patch)
treee595cc482b9d91ebb7e67fab49dd590f37ffd1f1 /archiva-modules
parent661d0a5f42875ba0418b93ff32bfbaffac39bfaa (diff)
downloadarchiva-8be9f7b74606d958721cc69f8f065404bd0b3a76.tar.gz
archiva-8be9f7b74606d958721cc69f8f065404bd0b3a76.zip
attempt to stabilie core consummer tests
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1370562 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurgeTest.java18
1 files changed, 16 insertions, 2 deletions
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurgeTest.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurgeTest.java
index b55179c5c..a1d92bd9e 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurgeTest.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurgeTest.java
@@ -43,6 +43,7 @@ import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
+import org.slf4j.LoggerFactory;
/**
*/
@@ -142,13 +143,26 @@ public abstract class AbstractRepositoryPurgeTest
}
}
+ private static String fixPath( String path )
+ {
+ if ( path.contains( " " ) )
+ {
+ LoggerFactory.getLogger(AbstractRepositoryPurgeTest.class.getName()).error(
+ "You are building and testing with a path: \n "
+ + path + " containing space. Consider relocating.");
+ return path.replaceAll(" ", "%20");
+ }
+ return path;
+ }
+
public ManagedRepository getRepoConfiguration( String repoId, String repoName )
{
config = new ManagedRepository();
config.setId( repoId );
config.setName( repoName );
config.setDaysOlder( TEST_DAYS_OLDER );
- config.setLocation( new File( "target/test-" + getName() + "/" + repoId ).getAbsolutePath() );
+ String path = AbstractRepositoryPurgeTest.fixPath( new File( "target/test-" + getName() + "/" + repoId ).getAbsolutePath() );
+ config.setLocation( path );
config.setReleases( true );
config.setSnapshots( true );
config.setDeleteReleasedSnapshots( true );
@@ -188,7 +202,7 @@ public abstract class AbstractRepositoryPurgeTest
throws Exception
{
removeMavenIndexes();
- File testDir = getTestRepoRoot();
+ File testDir = getTestRepoRoot();// AbstractRepositoryPurgeTest.fixPath( getTestRepoRoot() );
FileUtils.deleteDirectory( testDir );
FileUtils.copyDirectory( new File( "target/test-classes/" + TEST_REPO_ID ), testDir );