Skip to content

Commit

Permalink
NO PUSH
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew1001 committed Feb 28, 2024
1 parent 31af9d1 commit 3b18fdd
Show file tree
Hide file tree
Showing 14 changed files with 332 additions and 349 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ public void awaitPeerDiscovery(final Condition condition) {
private void loadPortsFile() {
try (final FileInputStream fis =
new FileInputStream(new File(homeDirectory.toFile(), "besu.ports"))) {
System.out.println("MRW: Loading ports from " + new File(homeDirectory.toFile(), "besu.ports").getPath());
portsProperties.load(fis);
LOG.info("Ports for node {}: {}", name, portsProperties);
} catch (final IOException e) {
Expand Down Expand Up @@ -797,11 +798,15 @@ public GenesisConfigurationProvider getGenesisConfigProvider() {

@Override
public Optional<String> getGenesisConfig() {
//System.out.println("MRW: Getting genesis config: " + genesisConfig);
return genesisConfig;
}

@Override
public void setGenesisConfig(final String config) {
//System.out.println("MRW: Setting genesis config. Was: " + genesisConfig);
//System.out.println("MRW: Setting genesis config. Is now: " + config);
//new Exception().printStackTrace();
this.genesisConfig = Optional.of(config);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,14 +494,18 @@ public BesuNode createQbftNodeWithTLSPKCS11(final String name) throws IOExceptio
}

public BesuNode createQbftNode(final String name) throws IOException {
JsonRpcConfiguration rpcConfig = node.createJsonRpcWithQbftEnabledConfig(false);
rpcConfig.setPort(Math.abs(name.hashCode() % 60000) + 1024); // Generate a consistent port for p2p based on node name
rpcConfig.addRpcApi("ADMIN,TXPOOL");
return create(
new BesuNodeConfigurationBuilder()
.name(name)
.miningEnabled()
.jsonRpcConfiguration(node.createJsonRpcWithQbftEnabledConfig(false))
.jsonRpcConfiguration(rpcConfig)
.webSocketConfiguration(node.createWebSocketEnabledConfig())
.devMode(false)
.genesisConfigProvider(GenesisConfigurationFactory::createQbftGenesisConfig)
.p2pPort(Math.abs(name.hashCode() % 60000) + 1024 + 500) // Generate a consistent port for p2p based on node name (+ 500 to avoid clashing with RPC port or other nodes with a similar name)
.build());
}

Expand Down
27 changes: 27 additions & 0 deletions acceptance-tests/tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,33 @@ task acceptanceTestCliqueBft(type: Test) {
doFirst { mkdir "${buildDir}/jvmErrorLogs" }
}

task acceptanceTestBftSoak(type: Test) {
inputs.property "integration.date", LocalTime.now() // so it runs at every invocation
include '**/bftsoak/**'

useJUnitPlatform {}

dependsOn(rootProject.installDist)
setSystemProperties(test.getSystemProperties())
systemProperty 'acctests.runBesuAsProcess', 'true'
systemProperty 'java.security.properties', "${buildDir}/resources/test/acceptanceTesting.security"
mustRunAfter rootProject.subprojects*.test
description = 'Runs BFT soak test.'
group = 'verification'

jvmArgs "-XX:ErrorFile=${buildDir}/jvmErrorLogs/java_err_pid%p.log"

testLogging {
exceptionFormat = 'full'
showStackTraces = true
showStandardStreams = true
showExceptions = true
showCauses = true
}

doFirst { mkdir "${buildDir}/jvmErrorLogs" }
}

task acceptanceTestPrivacy(type: Test) {
inputs.property "integration.date", LocalTime.now() // so it runs at every invocation
include '**/privacy/**'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ public class BftAcceptanceTestParameterization {

public static Stream<Arguments> getFactories() {
return Stream.of(
Arguments.of(
"ibft2",
new BftAcceptanceTestParameterization(
BesuNodeFactory::createIbft2Node, BesuNodeFactory::createIbft2NodeWithValidators)),
//Arguments.of(
// "ibft2",
// new BftAcceptanceTestParameterization(
// BesuNodeFactory::createIbft2Node, BesuNodeFactory::createIbft2NodeWithValidators)),
Arguments.of(
"qbft",
new BftAcceptanceTestParameterization(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

import java.util.stream.Stream;

import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.Cluster;
import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.ClusterConfiguration;
import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.ClusterConfigurationBuilder;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.params.provider.Arguments;

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 3b18fdd

Please sign in to comment.