diff --git a/gerrit-acceptance-framework/src/test/java/com/google/gerrit/acceptance/GerritServer.java b/gerrit-acceptance-framework/src/test/java/com/google/gerrit/acceptance/GerritServer.java index d1ec9e6299..c29e8fea54 100644 --- a/gerrit-acceptance-framework/src/test/java/com/google/gerrit/acceptance/GerritServer.java +++ b/gerrit-acceptance-framework/src/test/java/com/google/gerrit/acceptance/GerritServer.java @@ -47,6 +47,7 @@ import java.lang.reflect.Field; import java.net.InetAddress; import java.net.InetSocketAddress; import java.net.URI; +import java.nio.file.Paths; import java.util.concurrent.BrokenBarrierException; import java.util.concurrent.Callable; import java.util.concurrent.CyclicBarrier; @@ -129,7 +130,7 @@ public class GerritServer { throw new RuntimeException(e); } } - }); + }, Paths.get(baseConfig.getString("gerrit", null, "tempSiteDir"))); daemon.setEmailModuleForTesting(new FakeEmailSender.Module()); final File site; diff --git a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/Daemon.java b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/Daemon.java index 9d4120c6c4..ba280c3d56 100644 --- a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/Daemon.java +++ b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/Daemon.java @@ -175,7 +175,8 @@ public class Daemon extends SiteProgram { } @VisibleForTesting - public Daemon(Runnable serverStarted) { + public Daemon(Runnable serverStarted, Path sitePath) { + super (sitePath); this.serverStarted = serverStarted; } diff --git a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/util/SiteProgram.java b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/util/SiteProgram.java index 9e2da5c20a..a2e0450fc9 100644 --- a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/util/SiteProgram.java +++ b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/util/SiteProgram.java @@ -78,6 +78,10 @@ public abstract class SiteProgram extends AbstractProgram { protected SiteProgram() { } + protected SiteProgram(Path sitePath) { + this.sitePath = sitePath; + } + protected SiteProgram(Path sitePath, final Provider dsProvider) { this.sitePath = sitePath; this.dsProvider = dsProvider;