Skip to content

Commit a370514

Browse files
committed
Revert "Support running acceptance tests on Windows"
This reverts commit 215a7b9.
1 parent d9475b6 commit a370514

File tree

2 files changed

+12
-15
lines changed

2 files changed

+12
-15
lines changed

acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/AcceptanceTestBase.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,15 @@
5656
import java.util.concurrent.ExecutorService;
5757
import java.util.concurrent.Executors;
5858

59-
import org.junit.jupiter.api.AfterEach;
59+
import org.junit.After;
6060
import org.junit.jupiter.api.extension.ExtendWith;
6161
import org.slf4j.Logger;
6262
import org.slf4j.LoggerFactory;
6363

64-
/** Superclass for acceptance tests. */
64+
/**
65+
* Superclass for acceptance tests. For now (transition to junit5 is ongoing) this class supports
66+
* junit4 format.
67+
*/
6568
@ExtendWith(AcceptanceTestBaseTestWatcher.class)
6669
public class AcceptanceTestBase {
6770

@@ -128,7 +131,7 @@ protected AcceptanceTestBase() {
128131
exitedSuccessfully = new ExitedWithCode(0);
129132
}
130133

131-
@AfterEach
134+
@After
132135
public void tearDownAcceptanceTestBase() {
133136
reportMemory();
134137
cluster.close();

acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/ProcessBesuNodeRunner.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
import java.util.concurrent.TimeUnit;
5353
import java.util.stream.Collectors;
5454

55-
import org.apache.commons.lang3.SystemUtils;
5655
import org.slf4j.Logger;
5756
import org.slf4j.LoggerFactory;
5857
import org.slf4j.MDC;
@@ -78,15 +77,8 @@ public void startNode(final BesuNode node) {
7877

7978
final Path dataDir = node.homeDirectory();
8079

81-
final var workingDir =
82-
new File(System.getProperty("user.dir")).getParentFile().getParentFile().toPath();
83-
8480
final List<String> params = new ArrayList<>();
85-
if (SystemUtils.IS_OS_WINDOWS) {
86-
params.add(workingDir.resolve("build\\install\\besu\\bin\\besu.bat").toString());
87-
} else {
88-
params.add("build/install/besu/bin/besu");
89-
}
81+
params.add("build/install/besu/bin/besu");
9082

9183
params.add("--data-path");
9284
params.add(dataDir.toAbsolutePath().toString());
@@ -430,13 +422,15 @@ public void startNode(final BesuNode node) {
430422
LOG.info("Creating besu process with params {}", params);
431423
final ProcessBuilder processBuilder =
432424
new ProcessBuilder(params)
433-
.directory(workingDir.toFile())
425+
.directory(new File(System.getProperty("user.dir")).getParentFile().getParentFile())
434426
.redirectErrorStream(true)
435427
.redirectInput(Redirect.INHERIT);
436428
if (!node.getPlugins().isEmpty()) {
437429
processBuilder
438430
.environment()
439-
.put("BESU_OPTS", "-Dbesu.plugins.dir=" + dataDir.resolve("plugins").toAbsolutePath());
431+
.put(
432+
"BESU_OPTS",
433+
"-Dbesu.plugins.dir=" + dataDir.resolve("plugins").toAbsolutePath().toString());
440434
}
441435
// Use non-blocking randomness for acceptance tests
442436
processBuilder
@@ -578,7 +572,7 @@ private void killBesuProcess(final String name) {
578572

579573
LOG.info("Killing {} process, pid {}", name, process.pid());
580574

581-
process.descendants().forEach(ProcessHandle::destroy);
575+
process.destroy();
582576
try {
583577
process.waitFor(30, TimeUnit.SECONDS);
584578
} catch (final InterruptedException e) {

0 commit comments

Comments
 (0)