no need of unzip jetty-home for every single test if it is the same zip (based on lastModified file value) (#9486)

Signed-off-by: Olivier Lamy <olamy@apache.org>
This commit is contained in:
Olivier Lamy 2023-03-11 10:21:39 +10:00 committed by GitHub
parent 3c16575be0
commit d748fde470
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

View File

@ -347,11 +347,14 @@ public class JettyHomeTester
// create tmp directory to unzip distribution
Path homes = MavenTestingUtils.getTargetTestingPath("homes");
FS.ensureDirExists(homes);
Path tmp = Files.createTempDirectory(homes, "jetty_home_");
Path tmp = Files.createDirectories(homes.resolve(Long.toString(artifactFile.toFile().lastModified())));
Path home = tmp.resolve("jetty-home-" + version);
if (!Files.exists(home))
{
unzip(artifactFile, tmp);
}
unzip(artifactFile, tmp);
return tmp.resolve("jetty-home-" + version);
return home;
}
private RepositorySystem newRepositorySystem()