fix test on linux

git-svn-id: https://svn.apache.org/repos/asf/maven/repository-manager/trunk@389116 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2006-03-27 12:11:22 +00:00
parent dca7b7858d
commit ef39f31eca
1 changed files with 5 additions and 4 deletions

View File

@ -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 =