Allow nodes to start in parallel during AT (#1055)

Signed-off-by: Trent Mohay <trent.mohay@consensys.net>
pull/1061/head
Trent Mohay 5 years ago committed by GitHub
parent d927446303
commit 2aae3dedcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/ThreadBesuNodeRunner.java
  2. 3
      acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/node/cluster/Cluster.java

@ -56,6 +56,7 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
import io.vertx.core.Vertx;
@ -70,7 +71,7 @@ public class ThreadBesuNodeRunner implements BesuNodeRunner {
private static final Logger LOG = LogManager.getLogger();
private final Map<String, Runner> besuRunners = new HashMap<>();
private final Map<Node, BesuPluginContextImpl> besuPluginContextMap = new HashMap<>();
private final Map<Node, BesuPluginContextImpl> besuPluginContextMap = new ConcurrentHashMap<>();
private BesuPluginContextImpl buildPluginContext(
final BesuNode node,

@ -85,7 +85,8 @@ public class Cluster implements AutoCloseable {
final Optional<? extends RunnableNode> bootnode = selectAndStartBootnode(nodes);
nodes.stream()
nodes
.parallelStream()
.filter(node -> bootnode.map(boot -> boot != node).orElse(true))
.forEach(this::startNode);

Loading…
Cancel
Save