Skip to content

Commit

Permalink
MSITE-851 fixed IT: jar internal timestamp cause variable local ts
Browse files Browse the repository at this point in the history
  • Loading branch information
hboutemy committed Nov 9, 2019
1 parent 27d65b1 commit 4034f73
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/it/projects/site-jar/verify.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,17 @@ try

JarFile jar = new JarFile( siteJar );
Enumeration jarEntries = jar.entries();
long timestamp = -1;
while ( jarEntries.hasMoreElements() )
{
JarEntry entry = (JarEntry) jarEntries.nextElement();
if ( entry.getTime() != 1572713292000L )
if ( timestamp == -1 )
{
System.out.println( "wrong entry time for " + entry.getName() + ": " + entry.getTime() );
timestamp = entry.getTime(); // reproducible timestamp in jar file cause local timestamp depending on timezone
}
if ( entry.getTime() != timestamp )
{
System.out.println( "wrong entry time for " + entry.getName() + ": " + entry.getTime() + " instead of " + timestamp );
return false;
}
if ( !entry.isDirectory() )
Expand Down

0 comments on commit 4034f73

Please sign in to comment.