From 705298228b1d7cc152b093ce5598b20a60530542 Mon Sep 17 00:00:00 2001 From: mbaxter Date: Mon, 7 Oct 2019 03:01:38 -0400 Subject: [PATCH] Fix ThreadedNodeRunnner config setup (#90) Signed-off-by: Meredith Baxter --- .../tests/acceptance/dsl/node/ThreadBesuNodeRunner.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/ThreadBesuNodeRunner.java b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/ThreadBesuNodeRunner.java index cf6edb5a61..ab4918f236 100644 --- a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/ThreadBesuNodeRunner.java +++ b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/ThreadBesuNodeRunner.java @@ -15,6 +15,7 @@ package org.hyperledger.besu.tests.acceptance.dsl.node; import static org.hyperledger.besu.cli.config.NetworkName.DEV; +import static org.hyperledger.besu.controller.BesuController.DATABASE_PATH; import org.hyperledger.besu.Runner; import org.hyperledger.besu.RunnerBuilder; @@ -57,7 +58,6 @@ import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; -import com.google.common.io.Files; import io.vertx.core.Vertx; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -107,8 +107,9 @@ public class ThreadBesuNodeRunner implements BesuNodeRunner { } final StorageServiceImpl storageService = new StorageServiceImpl(); - final Path path = Files.createTempDir().toPath(); - final BesuConfiguration commonPluginConfiguration = new BesuConfigurationImpl(path, path); + final Path dataDir = node.homeDirectory(); + final BesuConfiguration commonPluginConfiguration = + new BesuConfigurationImpl(dataDir, dataDir.resolve(DATABASE_PATH)); final BesuPluginContextImpl besuPluginContext = besuPluginContextMap.computeIfAbsent( node, n -> buildPluginContext(node, storageService, commonPluginConfiguration));