mirror of https://github.com/apache/archiva.git
fix unit test in archiva-proxy cache url failure clear between tests
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1133396 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
95dde31389
commit
217ae16282
|
@ -267,7 +267,7 @@ public class ChecksummedFile
|
||||||
String rawChecksum = FileUtils.readFileToString( checksumFile );
|
String rawChecksum = FileUtils.readFileToString( checksumFile );
|
||||||
String expectedChecksum = parseChecksum( rawChecksum, checksumAlgorithm, referenceFile.getName() );
|
String expectedChecksum = parseChecksum( rawChecksum, checksumAlgorithm, referenceFile.getName() );
|
||||||
|
|
||||||
if ( StringUtils.equalsIgnoreCase( expectedChecksum, actualChecksum ) == false )
|
if ( ! StringUtils.equalsIgnoreCase( expectedChecksum, actualChecksum ) )
|
||||||
{
|
{
|
||||||
// create checksum (again)
|
// create checksum (again)
|
||||||
FileUtils.writeStringToFile( checksumFile, actualChecksum + " " + referenceFile.getName() );
|
FileUtils.writeStringToFile( checksumFile, actualChecksum + " " + referenceFile.getName() );
|
||||||
|
|
|
@ -111,4 +111,17 @@
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<systemPropertyVariables>
|
||||||
|
<java.io.tmpdir>${project.build.outputDirectory}</java.io.tmpdir>
|
||||||
|
</systemPropertyVariables>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -20,6 +20,7 @@ package org.apache.maven.archiva.proxy;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
import net.sf.ehcache.CacheManager;
|
||||||
import org.apache.archiva.common.plexusbridge.PlexusSisuBridge;
|
import org.apache.archiva.common.plexusbridge.PlexusSisuBridge;
|
||||||
import org.apache.commons.lang.ArrayUtils;
|
import org.apache.commons.lang.ArrayUtils;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
@ -201,6 +202,8 @@ public abstract class AbstractProxyTestCase
|
||||||
|
|
||||||
delegate.setDelegate( wagonMock );
|
delegate.setDelegate( wagonMock );
|
||||||
|
|
||||||
|
CacheManager.getInstance().clearAll();
|
||||||
|
|
||||||
log.info( "\n.\\ " + getName() + "() \\._________________________________________\n" );
|
log.info( "\n.\\ " + getName() + "() \\._________________________________________\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@ package org.apache.maven.archiva.proxy;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
import net.sf.ehcache.CacheManager;
|
||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
|
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
|
||||||
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
|
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
|
||||||
|
@ -158,6 +159,7 @@ public class HttpProxyTransferTest
|
||||||
|
|
||||||
config.getConfiguration().addRemoteRepository( repoConfig );
|
config.getConfiguration().addRemoteRepository( repoConfig );
|
||||||
|
|
||||||
|
CacheManager.getInstance().clearAll();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue