From 4034f7383df9627b5f799dda06c91a9d5f0b4564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Boutemy?= Date: Sat, 9 Nov 2019 17:34:05 +0100 Subject: [PATCH] MSITE-851 fixed IT: jar internal timestamp cause variable local ts --- src/it/projects/site-jar/verify.bsh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/it/projects/site-jar/verify.bsh b/src/it/projects/site-jar/verify.bsh index c512531b..4e5a08b4 100644 --- a/src/it/projects/site-jar/verify.bsh +++ b/src/it/projects/site-jar/verify.bsh @@ -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() )