diff options
author | Brett Porter <brett@apache.org> | 2006-03-27 12:11:22 +0000 |
---|---|---|
committer | Brett Porter <brett@apache.org> | 2006-03-27 12:11:22 +0000 |
commit | ef39f31ecaaba28c5101f3767f027d41965ee5f6 (patch) | |
tree | ed84496d8a389e09b2a5ce368df1eac74a330e13 /maven-repository-converter | |
parent | dca7b7858db2bcbd457ea605a08c1266bea78fc9 (diff) | |
download | archiva-ef39f31ecaaba28c5101f3767f027d41965ee5f6.tar.gz archiva-ef39f31ecaaba28c5101f3767f027d41965ee5f6.zip |
fix test on linux
git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@389116 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'maven-repository-converter')
-rw-r--r-- | maven-repository-converter/src/test/java/org/apache/maven/repository/converter/RepositoryConverterTest.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/maven-repository-converter/src/test/java/org/apache/maven/repository/converter/RepositoryConverterTest.java b/maven-repository-converter/src/test/java/org/apache/maven/repository/converter/RepositoryConverterTest.java index ddd062fba..33817594d 100644 --- a/maven-repository-converter/src/test/java/org/apache/maven/repository/converter/RepositoryConverterTest.java +++ b/maven-repository-converter/src/test/java/org/apache/maven/repository/converter/RepositoryConverterTest.java @@ -581,10 +581,11 @@ public class RepositoryConverterTest File targetFile = new File( targetRepository.getBasedir(), targetRepository.pathOf( artifact ) ); File targetPomFile = new File( targetRepository.getBasedir(), targetRepository.pathOf( pomArtifact ) ); - long origTime = targetFile.lastModified(); - long origPomTime = targetPomFile.lastModified(); - SimpleDateFormat dateFormat = new SimpleDateFormat( "yyyy-MM-dd" ); + long origTime = dateFormat.parse( "2006-03-03" ).getTime(); + targetFile.setLastModified( origTime ); + targetPomFile.setLastModified( origTime ); + sourceFile.setLastModified( dateFormat.parse( "2006-01-01" ).getTime() ); sourcePomFile.setLastModified( dateFormat.parse( "2006-02-02" ).getTime() ); @@ -595,7 +596,7 @@ public class RepositoryConverterTest compareFiles( sourcePomFile, targetPomFile ); assertFalse( "Check modified", origTime == targetFile.lastModified() ); - assertFalse( "Check modified", origPomTime == targetPomFile.lastModified() ); + assertFalse( "Check modified", origTime == targetPomFile.lastModified() ); ArtifactRepositoryMetadata metadata = new ArtifactRepositoryMetadata( artifact ); File metadataFile = |