Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Soak #2

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading