diff --git a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/AcceptanceTestBase.java b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/AcceptanceTestBase.java index 5256e71ee30..5eea28c7861 100644 --- a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/AcceptanceTestBase.java +++ b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/AcceptanceTestBase.java @@ -1,5 +1,5 @@ /* - * Copyright ConsenSys AG. + * Copyright contributors to Hyperledger Besu. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -14,9 +14,7 @@ */ package org.hyperledger.besu.tests.acceptance.dsl; -import static java.nio.charset.StandardCharsets.UTF_8; -import static org.assertj.core.api.Assertions.assertThat; - +import org.apache.logging.log4j.ThreadContext; import org.hyperledger.besu.tests.acceptance.dsl.account.Accounts; import org.hyperledger.besu.tests.acceptance.dsl.blockchain.Blockchain; import org.hyperledger.besu.tests.acceptance.dsl.condition.admin.AdminConditions; @@ -30,7 +28,6 @@ import org.hyperledger.besu.tests.acceptance.dsl.condition.txpool.TxPoolConditions; import org.hyperledger.besu.tests.acceptance.dsl.condition.web3.Web3Conditions; import org.hyperledger.besu.tests.acceptance.dsl.contract.ContractVerifier; -import org.hyperledger.besu.tests.acceptance.dsl.node.Node; import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.Cluster; import org.hyperledger.besu.tests.acceptance.dsl.node.configuration.BesuNodeFactory; import org.hyperledger.besu.tests.acceptance.dsl.node.configuration.permissioning.PermissionedNodeBuilder; @@ -45,143 +42,148 @@ import org.hyperledger.besu.tests.acceptance.dsl.transaction.perm.PermissioningTransactions; import org.hyperledger.besu.tests.acceptance.dsl.transaction.txpool.TxPoolTransactions; import org.hyperledger.besu.tests.acceptance.dsl.transaction.web3.Web3Transactions; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.TestInfo; +import org.junit.jupiter.api.extension.ExtendWith; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; -import java.lang.ProcessBuilder.Redirect; -import java.math.BigInteger; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; -import org.junit.After; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import static java.nio.charset.StandardCharsets.UTF_8; +import static org.assertj.core.api.Assertions.assertThat; /** * Superclass for acceptance tests. For now (transition to junit5 is ongoing) this class supports - * junit4 format. + * junit5 format. Once the transition is complete, this class can be removed and recombined with + * AcceptanceTestBase (original). */ @ExtendWith(AcceptanceTestBaseTestWatcher.class) public class AcceptanceTestBase { - private static final Logger LOG = LoggerFactory.getLogger(AcceptanceTestBase.class); - - protected final Accounts accounts; - protected final AccountTransactions accountTransactions; - protected final AdminConditions admin; - protected final AdminTransactions adminTransactions; - protected final Blockchain blockchain; - protected final CliqueConditions clique; - protected final CliqueTransactions cliqueTransactions; - protected final Cluster cluster; - protected final ContractVerifier contractVerifier; - protected final ContractTransactions contractTransactions; - protected final EthConditions eth; - protected final EthTransactions ethTransactions; - protected final BftTransactions bftTransactions; - protected final BftConditions bft; - protected final LoginConditions login; - protected final NetConditions net; - protected final BesuNodeFactory besu; - protected final PermissioningConditions perm; - protected final PermissionedNodeBuilder permissionedNodeBuilder; - protected final PermissioningTransactions permissioningTransactions; - protected final MinerTransactions minerTransactions; - protected final Web3Conditions web3; - protected final TxPoolConditions txPoolConditions; - protected final TxPoolTransactions txPoolTransactions; - protected final ExitedWithCode exitedSuccessfully; - - private final ExecutorService outputProcessorExecutor = Executors.newCachedThreadPool(); + private static final Logger LOG = LoggerFactory.getLogger(AcceptanceTestBase.class); - protected AcceptanceTestBase() { - ethTransactions = new EthTransactions(); - accounts = new Accounts(ethTransactions); - adminTransactions = new AdminTransactions(); - cliqueTransactions = new CliqueTransactions(); - bftTransactions = new BftTransactions(); - accountTransactions = new AccountTransactions(accounts); - permissioningTransactions = new PermissioningTransactions(); - contractTransactions = new ContractTransactions(); - minerTransactions = new MinerTransactions(); - blockchain = new Blockchain(ethTransactions); - clique = new CliqueConditions(ethTransactions, cliqueTransactions); - eth = new EthConditions(ethTransactions); - bft = new BftConditions(bftTransactions); - login = new LoginConditions(); - net = new NetConditions(new NetTransactions()); - cluster = new Cluster(net); - perm = new PermissioningConditions(permissioningTransactions); - admin = new AdminConditions(adminTransactions); - web3 = new Web3Conditions(new Web3Transactions()); - besu = new BesuNodeFactory(); - txPoolTransactions = new TxPoolTransactions(); - txPoolConditions = new TxPoolConditions(txPoolTransactions); - contractVerifier = new ContractVerifier(accounts.getPrimaryBenefactor()); - permissionedNodeBuilder = new PermissionedNodeBuilder(); - exitedSuccessfully = new ExitedWithCode(0); - } + protected final Accounts accounts; + protected final AccountTransactions accountTransactions; + protected final AdminConditions admin; + protected final AdminTransactions adminTransactions; + protected final Blockchain blockchain; + protected final CliqueConditions clique; + protected final CliqueTransactions cliqueTransactions; + protected final Cluster cluster; + protected final ContractVerifier contractVerifier; + protected final ContractTransactions contractTransactions; + protected final EthConditions eth; + protected final EthTransactions ethTransactions; + protected final BftTransactions bftTransactions; + protected final BftConditions bft; + protected final LoginConditions login; + protected final NetConditions net; + protected final BesuNodeFactory besu; + protected final PermissioningConditions perm; + protected final PermissionedNodeBuilder permissionedNodeBuilder; + protected final PermissioningTransactions permissioningTransactions; + protected final MinerTransactions minerTransactions; + protected final Web3Conditions web3; + protected final TxPoolConditions txPoolConditions; + protected final TxPoolTransactions txPoolTransactions; + protected final ExitedWithCode exitedSuccessfully; - @After - public void tearDownAcceptanceTestBase() { - reportMemory(); - cluster.close(); - } + private final ExecutorService outputProcessorExecutor = Executors.newCachedThreadPool(); - public void reportMemory() { - String os = System.getProperty("os.name"); - String[] command = null; - if (os.contains("Linux")) { - command = new String[] {"/usr/bin/top", "-n", "1", "-o", "%MEM", "-b", "-c", "-w", "180"}; + protected AcceptanceTestBase() { + ethTransactions = new EthTransactions(); + accounts = new Accounts(ethTransactions); + adminTransactions = new AdminTransactions(); + cliqueTransactions = new CliqueTransactions(); + bftTransactions = new BftTransactions(); + accountTransactions = new AccountTransactions(accounts); + permissioningTransactions = new PermissioningTransactions(); + contractTransactions = new ContractTransactions(); + minerTransactions = new MinerTransactions(); + blockchain = new Blockchain(ethTransactions); + clique = new CliqueConditions(ethTransactions, cliqueTransactions); + eth = new EthConditions(ethTransactions); + bft = new BftConditions(bftTransactions); + login = new LoginConditions(); + net = new NetConditions(new NetTransactions()); + cluster = new Cluster(net); + perm = new PermissioningConditions(permissioningTransactions); + admin = new AdminConditions(adminTransactions); + web3 = new Web3Conditions(new Web3Transactions()); + besu = new BesuNodeFactory(); + txPoolTransactions = new TxPoolTransactions(); + txPoolConditions = new TxPoolConditions(txPoolTransactions); + contractVerifier = new ContractVerifier(accounts.getPrimaryBenefactor()); + permissionedNodeBuilder = new PermissionedNodeBuilder(); + exitedSuccessfully = new ExitedWithCode(0); } - if (os.contains("Mac")) { - command = new String[] {"/usr/bin/top", "-l", "1", "-o", "mem", "-n", "20"}; + + @BeforeEach + public void setUp(final TestInfo testInfo) { + // log4j is configured to create a file per test + // build/acceptanceTestLogs/${ctx:class}.${ctx:test}.log + ThreadContext.put("class", this.getClass().getSimpleName()); + ThreadContext.put("test", testInfo.getTestMethod().get().getName()); } - if (command != null) { - LOG.info("Memory usage at end of test:"); - final ProcessBuilder processBuilder = - new ProcessBuilder(command).redirectErrorStream(true).redirectInput(Redirect.INHERIT); - try { - final Process memInfoProcess = processBuilder.start(); - outputProcessorExecutor.execute(() -> printOutput(memInfoProcess)); - memInfoProcess.waitFor(); - LOG.debug("Memory info process exited with code {}", memInfoProcess.exitValue()); - } catch (final Exception e) { - LOG.warn("Error running memory information process", e); - } - } else { - LOG.info("Don't know how to report memory for OS {}", os); + + @AfterEach + public void tearDownAcceptanceTestBase() { + reportMemory(); + cluster.close(); } - } - private void printOutput(final Process process) { - try (final BufferedReader in = - new BufferedReader(new InputStreamReader(process.getInputStream(), UTF_8))) { - String line = in.readLine(); - while (line != null) { - LOG.info(line); - line = in.readLine(); - } - } catch (final IOException e) { - LOG.warn("Failed to read output from memory information process: ", e); + public void reportMemory() { + String os = System.getProperty("os.name"); + String[] command = null; + if (os.contains("Linux")) { + command = new String[]{"/usr/bin/top", "-n", "1", "-o", "%MEM", "-b", "-c", "-w", "180"}; + } + if (os.contains("Mac")) { + command = new String[]{"/usr/bin/top", "-l", "1", "-o", "mem", "-n", "20"}; + } + if (command != null) { + LOG.info("Memory usage at end of test:"); + final ProcessBuilder processBuilder = + new ProcessBuilder(command) + .redirectErrorStream(true) + .redirectInput(ProcessBuilder.Redirect.INHERIT); + try { + final Process memInfoProcess = processBuilder.start(); + outputProcessorExecutor.execute(() -> printOutput(memInfoProcess)); + memInfoProcess.waitFor(); + LOG.debug("Memory info process exited with code {}", memInfoProcess.exitValue()); + } catch (final Exception e) { + LOG.warn("Error running memory information process", e); + } + } else { + LOG.info("Don't know how to report memory for OS {}", os); + } } - } - protected void waitForBlockHeight(final Node node, final long blockchainHeight) { - WaitUtils.waitFor( - 120, - () -> - assertThat(node.execute(ethTransactions.blockNumber())) - .isGreaterThanOrEqualTo(BigInteger.valueOf(blockchainHeight))); - } + private void printOutput(final Process process) { + try (final BufferedReader in = + new BufferedReader(new InputStreamReader(process.getInputStream(), UTF_8))) { + String line = in.readLine(); + while (line != null) { + LOG.info(line); + line = in.readLine(); + } + } catch (final IOException e) { + LOG.warn("Failed to read output from memory information process: ", e); + } + } - @Test - public void dryRunDetector() { - assertThat(true) - .withFailMessage("This test is here so gradle --dry-run executes this class") - .isTrue(); - } + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/AcceptanceTestBaseJunit5.java b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/AcceptanceTestBaseJunit5.java deleted file mode 100644 index 4f3046c1abf..00000000000 --- a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/AcceptanceTestBaseJunit5.java +++ /dev/null @@ -1,200 +0,0 @@ -/* - * Copyright contributors to Hyperledger Besu. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ -package org.hyperledger.besu.tests.acceptance.dsl; - -import static java.nio.charset.StandardCharsets.UTF_8; -import static org.assertj.core.api.Assertions.assertThat; - -import org.hyperledger.besu.tests.acceptance.dsl.account.Accounts; -import org.hyperledger.besu.tests.acceptance.dsl.blockchain.Blockchain; -import org.hyperledger.besu.tests.acceptance.dsl.condition.admin.AdminConditions; -import org.hyperledger.besu.tests.acceptance.dsl.condition.bft.BftConditions; -import org.hyperledger.besu.tests.acceptance.dsl.condition.clique.CliqueConditions; -import org.hyperledger.besu.tests.acceptance.dsl.condition.eth.EthConditions; -import org.hyperledger.besu.tests.acceptance.dsl.condition.login.LoginConditions; -import org.hyperledger.besu.tests.acceptance.dsl.condition.net.NetConditions; -import org.hyperledger.besu.tests.acceptance.dsl.condition.perm.PermissioningConditions; -import org.hyperledger.besu.tests.acceptance.dsl.condition.process.ExitedWithCode; -import org.hyperledger.besu.tests.acceptance.dsl.condition.txpool.TxPoolConditions; -import org.hyperledger.besu.tests.acceptance.dsl.condition.web3.Web3Conditions; -import org.hyperledger.besu.tests.acceptance.dsl.contract.ContractVerifier; -import org.hyperledger.besu.tests.acceptance.dsl.node.Node; -import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.Cluster; -import org.hyperledger.besu.tests.acceptance.dsl.node.configuration.BesuNodeFactory; -import org.hyperledger.besu.tests.acceptance.dsl.node.configuration.permissioning.PermissionedNodeBuilder; -import org.hyperledger.besu.tests.acceptance.dsl.transaction.account.AccountTransactions; -import org.hyperledger.besu.tests.acceptance.dsl.transaction.admin.AdminTransactions; -import org.hyperledger.besu.tests.acceptance.dsl.transaction.bft.BftTransactions; -import org.hyperledger.besu.tests.acceptance.dsl.transaction.clique.CliqueTransactions; -import org.hyperledger.besu.tests.acceptance.dsl.transaction.contract.ContractTransactions; -import org.hyperledger.besu.tests.acceptance.dsl.transaction.eth.EthTransactions; -import org.hyperledger.besu.tests.acceptance.dsl.transaction.miner.MinerTransactions; -import org.hyperledger.besu.tests.acceptance.dsl.transaction.net.NetTransactions; -import org.hyperledger.besu.tests.acceptance.dsl.transaction.perm.PermissioningTransactions; -import org.hyperledger.besu.tests.acceptance.dsl.transaction.txpool.TxPoolTransactions; -import org.hyperledger.besu.tests.acceptance.dsl.transaction.web3.Web3Transactions; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.math.BigInteger; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -import org.apache.logging.log4j.ThreadContext; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.TestInfo; -import org.junit.jupiter.api.extension.ExtendWith; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Superclass for acceptance tests. For now (transition to junit5 is ongoing) this class supports - * junit5 format. Once the transition is complete, this class can be removed and recombined with - * AcceptanceTestBase (original). - */ -@ExtendWith(AcceptanceTestBaseTestWatcher.class) -public class AcceptanceTestBaseJunit5 { - - private static final Logger LOG = LoggerFactory.getLogger(AcceptanceTestBaseJunit5.class); - - protected final Accounts accounts; - protected final AccountTransactions accountTransactions; - protected final AdminConditions admin; - protected final AdminTransactions adminTransactions; - protected final Blockchain blockchain; - protected final CliqueConditions clique; - protected final CliqueTransactions cliqueTransactions; - protected final Cluster cluster; - protected final ContractVerifier contractVerifier; - protected final ContractTransactions contractTransactions; - protected final EthConditions eth; - protected final EthTransactions ethTransactions; - protected final BftTransactions bftTransactions; - protected final BftConditions bft; - protected final LoginConditions login; - protected final NetConditions net; - protected final BesuNodeFactory besu; - protected final PermissioningConditions perm; - protected final PermissionedNodeBuilder permissionedNodeBuilder; - protected final PermissioningTransactions permissioningTransactions; - protected final MinerTransactions minerTransactions; - protected final Web3Conditions web3; - protected final TxPoolConditions txPoolConditions; - protected final TxPoolTransactions txPoolTransactions; - protected final ExitedWithCode exitedSuccessfully; - - private final ExecutorService outputProcessorExecutor = Executors.newCachedThreadPool(); - - protected AcceptanceTestBaseJunit5() { - ethTransactions = new EthTransactions(); - accounts = new Accounts(ethTransactions); - adminTransactions = new AdminTransactions(); - cliqueTransactions = new CliqueTransactions(); - bftTransactions = new BftTransactions(); - accountTransactions = new AccountTransactions(accounts); - permissioningTransactions = new PermissioningTransactions(); - contractTransactions = new ContractTransactions(); - minerTransactions = new MinerTransactions(); - blockchain = new Blockchain(ethTransactions); - clique = new CliqueConditions(ethTransactions, cliqueTransactions); - eth = new EthConditions(ethTransactions); - bft = new BftConditions(bftTransactions); - login = new LoginConditions(); - net = new NetConditions(new NetTransactions()); - cluster = new Cluster(net); - perm = new PermissioningConditions(permissioningTransactions); - admin = new AdminConditions(adminTransactions); - web3 = new Web3Conditions(new Web3Transactions()); - besu = new BesuNodeFactory(); - txPoolTransactions = new TxPoolTransactions(); - txPoolConditions = new TxPoolConditions(txPoolTransactions); - contractVerifier = new ContractVerifier(accounts.getPrimaryBenefactor()); - permissionedNodeBuilder = new PermissionedNodeBuilder(); - exitedSuccessfully = new ExitedWithCode(0); - } - - @BeforeEach - public void setUp(final TestInfo testInfo) { - // log4j is configured to create a file per test - // build/acceptanceTestLogs/${ctx:class}.${ctx:test}.log - ThreadContext.put("class", this.getClass().getSimpleName()); - ThreadContext.put("test", testInfo.getTestMethod().get().getName()); - } - - @AfterEach - public void tearDownAcceptanceTestBase() { - reportMemory(); - cluster.close(); - } - - public void reportMemory() { - String os = System.getProperty("os.name"); - String[] command = null; - if (os.contains("Linux")) { - command = new String[] {"/usr/bin/top", "-n", "1", "-o", "%MEM", "-b", "-c", "-w", "180"}; - } - if (os.contains("Mac")) { - command = new String[] {"/usr/bin/top", "-l", "1", "-o", "mem", "-n", "20"}; - } - if (command != null) { - LOG.info("Memory usage at end of test:"); - final ProcessBuilder processBuilder = - new ProcessBuilder(command) - .redirectErrorStream(true) - .redirectInput(ProcessBuilder.Redirect.INHERIT); - try { - final Process memInfoProcess = processBuilder.start(); - outputProcessorExecutor.execute(() -> printOutput(memInfoProcess)); - memInfoProcess.waitFor(); - LOG.debug("Memory info process exited with code {}", memInfoProcess.exitValue()); - } catch (final Exception e) { - LOG.warn("Error running memory information process", e); - } - } else { - LOG.info("Don't know how to report memory for OS {}", os); - } - } - - private void printOutput(final Process process) { - try (final BufferedReader in = - new BufferedReader(new InputStreamReader(process.getInputStream(), UTF_8))) { - String line = in.readLine(); - while (line != null) { - LOG.info(line); - line = in.readLine(); - } - } catch (final IOException e) { - LOG.warn("Failed to read output from memory information process: ", e); - } - } - - protected void waitForBlockHeight(final Node node, final long blockchainHeight) { - WaitUtils.waitFor( - 120, - () -> - assertThat(node.execute(ethTransactions.blockNumber())) - .isGreaterThanOrEqualTo(BigInteger.valueOf(blockchainHeight))); - } - - @Test - void dryRunDetector() { - assertThat(true) - .withFailMessage("This test is here so gradle --dry-run executes this class") - .isTrue(); - } -} diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/AbstractPreexistingNodeTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/AbstractPreexistingNodeTest.java index fe148921002..5597356d6be 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/AbstractPreexistingNodeTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/AbstractPreexistingNodeTest.java @@ -17,7 +17,6 @@ import static java.nio.file.StandardCopyOption.REPLACE_EXISTING; import org.hyperledger.besu.datatypes.Wei; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.configuration.BesuNodeConfigurationBuilder; import java.io.File; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/CreateAccountAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/CreateAccountAcceptanceTest.java index c0af67c4942..3949fd5f019 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/CreateAccountAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/CreateAccountAcceptanceTest.java @@ -14,7 +14,6 @@ */ package org.hyperledger.besu.tests.acceptance; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.account.Account; import org.hyperledger.besu.tests.acceptance.dsl.blockchain.Amount; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/GossipTransactionAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/GossipTransactionAcceptanceTest.java index 1e6ca018918..ce2702b4540 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/GossipTransactionAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/GossipTransactionAcceptanceTest.java @@ -15,7 +15,6 @@ package org.hyperledger.besu.tests.acceptance; import org.hyperledger.besu.datatypes.Hash; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.account.Account; import org.hyperledger.besu.tests.acceptance.dsl.blockchain.Amount; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/LoggingTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/LoggingTest.java index 8a231a775db..e76429f50be 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/LoggingTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/LoggingTest.java @@ -16,7 +16,6 @@ import static org.assertj.core.api.Assertions.assertThat; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import java.io.IOException; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/MetricsAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/MetricsAcceptanceTest.java index 2f7aee17b60..7f951f0c656 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/MetricsAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/MetricsAcceptanceTest.java @@ -16,7 +16,6 @@ import static org.assertj.core.api.Assertions.assertThat; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import org.hyperledger.besu.tests.acceptance.dsl.node.configuration.BesuNodeConfigurationBuilder; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/OpenTelemetryAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/OpenTelemetryAcceptanceTest.java index 0e463e6ab73..a3341ef16ea 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/OpenTelemetryAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/OpenTelemetryAcceptanceTest.java @@ -19,7 +19,6 @@ import org.hyperledger.besu.metrics.MetricsProtocol; import org.hyperledger.besu.metrics.prometheus.MetricsConfiguration; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.WaitUtils; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import org.hyperledger.besu.tests.acceptance.dsl.node.configuration.BesuNodeConfigurationBuilder; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/RpcApisTogglesAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/RpcApisTogglesAcceptanceTest.java index 821d440b71c..d0c1ddf2438 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/RpcApisTogglesAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/RpcApisTogglesAcceptanceTest.java @@ -18,7 +18,6 @@ import static org.assertj.core.api.Assertions.catchThrowable; import org.hyperledger.besu.ethereum.api.jsonrpc.RpcApis; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import org.java_websocket.exceptions.WebsocketNotConnectedException; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/RunHelpTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/RunHelpTest.java index dabb277b048..d499414831f 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/RunHelpTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/RunHelpTest.java @@ -16,7 +16,6 @@ import static org.assertj.core.api.Assertions.assertThat; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.WaitUtils; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bft/ParameterizedBftTestBase.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bft/ParameterizedBftTestBase.java index b3d1e321aea..76a1a4a6bcc 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bft/ParameterizedBftTestBase.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bft/ParameterizedBftTestBase.java @@ -14,7 +14,7 @@ */ package org.hyperledger.besu.tests.acceptance.bft; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBaseJunit5; +import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import java.util.stream.Stream; @@ -22,7 +22,7 @@ import org.junit.jupiter.params.provider.Arguments; @Disabled("This is not a test class, it offers BFT parameterization only.") -public abstract class ParameterizedBftTestBase extends AcceptanceTestBaseJunit5 { +public abstract class ParameterizedBftTestBase extends AcceptanceTestBase { protected String bftType; protected BftAcceptanceTestParameterization nodeFactory; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bft/qbft/QbftContractAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bft/qbft/QbftContractAcceptanceTest.java index b62eb96e195..038f2be16c1 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bft/qbft/QbftContractAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bft/qbft/QbftContractAcceptanceTest.java @@ -14,13 +14,13 @@ */ package org.hyperledger.besu.tests.acceptance.bft.qbft; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBaseJunit5; +import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.account.Account; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import org.junit.jupiter.api.Test; -public class QbftContractAcceptanceTest extends AcceptanceTestBaseJunit5 { +public class QbftContractAcceptanceTest extends AcceptanceTestBase { @Test public void shouldMineOnMultipleNodesEvenWhenClusterContainsNonValidator() throws Exception { diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bootstrap/ClusterAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bootstrap/ClusterAcceptanceTest.java index e7ad04dc594..c28400739b8 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bootstrap/ClusterAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bootstrap/ClusterAcceptanceTest.java @@ -14,7 +14,6 @@ */ package org.hyperledger.besu.tests.acceptance.bootstrap; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; import org.junit.jupiter.api.BeforeEach; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bootstrap/ClusterNoDiscoveryAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bootstrap/ClusterNoDiscoveryAcceptanceTest.java index 3a7da4f4768..04a145781fe 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bootstrap/ClusterNoDiscoveryAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bootstrap/ClusterNoDiscoveryAcceptanceTest.java @@ -14,7 +14,6 @@ */ package org.hyperledger.besu.tests.acceptance.bootstrap; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.Cluster; import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.ClusterConfiguration; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bootstrap/ClusterThreadNodeRunnerAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bootstrap/ClusterThreadNodeRunnerAcceptanceTest.java index 39cc5ad26fc..58ad1ced6f5 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bootstrap/ClusterThreadNodeRunnerAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bootstrap/ClusterThreadNodeRunnerAcceptanceTest.java @@ -14,7 +14,6 @@ */ package org.hyperledger.besu.tests.acceptance.bootstrap; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNodeRunner; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bootstrap/P2pDisabledAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bootstrap/P2pDisabledAcceptanceTest.java index 67a9bf2754f..794cc5dbd2a 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bootstrap/P2pDisabledAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bootstrap/P2pDisabledAcceptanceTest.java @@ -14,7 +14,6 @@ */ package org.hyperledger.besu.tests.acceptance.bootstrap; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.Cluster; import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.ClusterConfiguration; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bootstrap/StaticNodesAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bootstrap/StaticNodesAcceptanceTest.java index 0ce5ea02b13..a899b576cb3 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bootstrap/StaticNodesAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/bootstrap/StaticNodesAcceptanceTest.java @@ -14,7 +14,6 @@ */ package org.hyperledger.besu.tests.acceptance.bootstrap; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.WaitUtils; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueDiscardRpcAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueDiscardRpcAcceptanceTest.java index 6ea274b6991..3ac42cb056c 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueDiscardRpcAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueDiscardRpcAcceptanceTest.java @@ -14,14 +14,14 @@ */ package org.hyperledger.besu.tests.acceptance.clique; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBaseJunit5; +import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import java.io.IOException; import org.junit.jupiter.api.Test; -public class CliqueDiscardRpcAcceptanceTest extends AcceptanceTestBaseJunit5 { +public class CliqueDiscardRpcAcceptanceTest extends AcceptanceTestBase { @Test public void shouldDiscardVotes() throws IOException { diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueGetSignersRpcAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueGetSignersRpcAcceptanceTest.java index ba848b0052c..25a1d335105 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueGetSignersRpcAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueGetSignersRpcAcceptanceTest.java @@ -16,7 +16,7 @@ import static org.hyperledger.besu.tests.acceptance.dsl.transaction.clique.CliqueTransactions.LATEST; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBaseJunit5; +import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import org.junit.jupiter.api.BeforeEach; @@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test; @Disabled("flaky test due to hardcoded block numbers") -public class CliqueGetSignersRpcAcceptanceTest extends AcceptanceTestBaseJunit5 { +public class CliqueGetSignersRpcAcceptanceTest extends AcceptanceTestBase { private BesuNode minerNode1; private BesuNode minerNode2; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueMiningAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueMiningAcceptanceTest.java index f6718b4ded1..9a743c9a638 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueMiningAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueMiningAcceptanceTest.java @@ -18,9 +18,12 @@ import static org.assertj.core.api.AssertionsForClassTypes.assertThat; import static org.assertj.core.data.Percentage.withPercentage; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBaseJunit5; +import org.assertj.core.api.Assertions; +import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; +import org.hyperledger.besu.tests.acceptance.dsl.WaitUtils; import org.hyperledger.besu.tests.acceptance.dsl.account.Account; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; +import org.hyperledger.besu.tests.acceptance.dsl.node.Node; import org.hyperledger.besu.tests.acceptance.dsl.node.configuration.genesis.GenesisConfigurationFactory.CliqueOptions; import java.io.IOException; @@ -32,7 +35,7 @@ import org.junit.jupiter.api.Test; import org.web3j.protocol.core.DefaultBlockParameter; -public class CliqueMiningAcceptanceTest extends AcceptanceTestBaseJunit5 { +public class CliqueMiningAcceptanceTest extends AcceptanceTestBase { @Test public void shouldMineTransactionsOnSingleNode() throws IOException { @@ -121,7 +124,12 @@ private void startClusterAndVerifyProducingBlocks( cluster.start(minerNode1, minerNode2, minerNode3); // verify that we have started producing blocks - waitForBlockHeight(minerNode1, 1); + WaitUtils.waitFor( + 120, + () -> + Assertions.assertThat(((Node) minerNode1).execute(ethTransactions.blockNumber())) + .isGreaterThanOrEqualTo(BigInteger.valueOf(1)) + ); final var minerChainHead = minerNode1.execute(ethTransactions.block()); minerNode2.verify(blockchain.minimumHeight(minerChainHead.getNumber().longValue())); minerNode3.verify(blockchain.minimumHeight(minerChainHead.getNumber().longValue())); diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueProposalRpcAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueProposalRpcAcceptanceTest.java index a7e8ebb9c9c..6cbfbbda0f0 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueProposalRpcAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueProposalRpcAcceptanceTest.java @@ -14,14 +14,14 @@ */ package org.hyperledger.besu.tests.acceptance.clique; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBaseJunit5; +import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import java.io.IOException; import org.junit.jupiter.api.Test; -public class CliqueProposalRpcAcceptanceTest extends AcceptanceTestBaseJunit5 { +public class CliqueProposalRpcAcceptanceTest extends AcceptanceTestBase { @Test public void shouldReturnProposals() throws IOException { diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueProposeRpcAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueProposeRpcAcceptanceTest.java index d4fb71c36b4..1674c551a4b 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueProposeRpcAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueProposeRpcAcceptanceTest.java @@ -14,7 +14,7 @@ */ package org.hyperledger.besu.tests.acceptance.clique; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBaseJunit5; +import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.condition.Condition; import org.hyperledger.besu.tests.acceptance.dsl.condition.clique.ExpectNonceVote.CLIQUE_NONCE_VOTE; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; @@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test; -public class CliqueProposeRpcAcceptanceTest extends AcceptanceTestBaseJunit5 { +public class CliqueProposeRpcAcceptanceTest extends AcceptanceTestBase { @Test public void shouldAddValidators() throws IOException { diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueZeroValidatorsAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueZeroValidatorsAcceptanceTest.java index b0c6afd93fc..e124e669d92 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueZeroValidatorsAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/clique/CliqueZeroValidatorsAcceptanceTest.java @@ -14,14 +14,14 @@ */ package org.hyperledger.besu.tests.acceptance.clique; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBaseJunit5; +import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import java.io.IOException; import org.junit.jupiter.api.Test; -public class CliqueZeroValidatorsAcceptanceTest extends AcceptanceTestBaseJunit5 { +public class CliqueZeroValidatorsAcceptanceTest extends AcceptanceTestBase { @Test public void zeroValidatorsFormValidCluster() throws IOException { diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/config/BootNodesGenesisSetupTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/config/BootNodesGenesisSetupTest.java index 616afc19669..c61a120856e 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/config/BootNodesGenesisSetupTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/config/BootNodesGenesisSetupTest.java @@ -18,7 +18,6 @@ import org.hyperledger.besu.crypto.SECPPrivateKey; import org.hyperledger.besu.crypto.SECPPublicKey; import org.hyperledger.besu.crypto.SignatureAlgorithm; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; import org.hyperledger.besu.tests.acceptance.dsl.node.configuration.BesuNodeConfigurationBuilder; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/crypto/SECP256R1AcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/crypto/SECP256R1AcceptanceTest.java index 27679463bfd..1d5c0b4f20a 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/crypto/SECP256R1AcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/crypto/SECP256R1AcceptanceTest.java @@ -20,7 +20,6 @@ import org.hyperledger.besu.crypto.KeyPair; import org.hyperledger.besu.crypto.SECP256R1; import org.hyperledger.besu.datatypes.Hash; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.account.Account; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNodeRunner; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/ethereum/CodeDelegationTransactionAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/ethereum/CodeDelegationTransactionAcceptanceTest.java index ee896ccd278..4ecbab6133a 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/ethereum/CodeDelegationTransactionAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/ethereum/CodeDelegationTransactionAcceptanceTest.java @@ -22,7 +22,6 @@ import org.hyperledger.besu.datatypes.TransactionType; import org.hyperledger.besu.datatypes.Wei; import org.hyperledger.besu.ethereum.core.Transaction; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.account.Account; import org.hyperledger.besu.tests.acceptance.dsl.blockchain.Amount; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/DeploySmartContractAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/DeploySmartContractAcceptanceTest.java index 06bd5cbfda5..fadc58cf83b 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/DeploySmartContractAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/DeploySmartContractAcceptanceTest.java @@ -14,7 +14,6 @@ */ package org.hyperledger.besu.tests.acceptance.jsonrpc; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import org.hyperledger.besu.tests.web3j.generated.SimpleStorage; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/DeployTransactionAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/DeployTransactionAcceptanceTest.java index 909d40beb3a..decdfae6a2f 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/DeployTransactionAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/DeployTransactionAcceptanceTest.java @@ -15,7 +15,6 @@ package org.hyperledger.besu.tests.acceptance.jsonrpc; import org.hyperledger.besu.datatypes.Hash; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.account.Account; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthEstimateGasAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthEstimateGasAcceptanceTest.java index a09f44093ea..151d294550b 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthEstimateGasAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthEstimateGasAcceptanceTest.java @@ -16,7 +16,6 @@ import static org.assertj.core.api.Assertions.assertThat; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import org.hyperledger.besu.tests.acceptance.dsl.node.configuration.genesis.GenesisConfigurationFactory; import org.hyperledger.besu.tests.acceptance.dsl.transaction.eth.EthCallTransaction; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthGetWorkAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthGetWorkAcceptanceTest.java index c4842348aa9..82e15a2075b 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthGetWorkAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthGetWorkAcceptanceTest.java @@ -14,7 +14,6 @@ */ package org.hyperledger.besu.tests.acceptance.jsonrpc; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; import org.junit.jupiter.api.BeforeEach; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthSendRawTransactionAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthSendRawTransactionAcceptanceTest.java index 30c32546c5a..27940d771ee 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthSendRawTransactionAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthSendRawTransactionAcceptanceTest.java @@ -14,7 +14,6 @@ */ package org.hyperledger.besu.tests.acceptance.jsonrpc; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.account.Account; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; import org.hyperledger.besu.tests.acceptance.dsl.node.configuration.BesuNodeConfigurationBuilder; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EventEmitterAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EventEmitterAcceptanceTest.java index de4bfdb6464..e52b624ecb2 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EventEmitterAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EventEmitterAcceptanceTest.java @@ -16,7 +16,6 @@ import static org.assertj.core.api.Assertions.assertThat; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import org.hyperledger.besu.tests.web3j.generated.EventEmitter; import org.hyperledger.besu.tests.web3j.generated.EventEmitter.StoredEventResponse; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/JsonRpcHttpAuthenticationAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/JsonRpcHttpAuthenticationAcceptanceTest.java index 3ef383a5265..9d009e076a8 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/JsonRpcHttpAuthenticationAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/JsonRpcHttpAuthenticationAcceptanceTest.java @@ -14,7 +14,6 @@ */ package org.hyperledger.besu.tests.acceptance.jsonrpc; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.Cluster; import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.ClusterConfiguration; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/JsonRpcWebsocketAuthenticationAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/JsonRpcWebsocketAuthenticationAcceptanceTest.java index 47d236e5b39..7cba8609b3c 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/JsonRpcWebsocketAuthenticationAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/JsonRpcWebsocketAuthenticationAcceptanceTest.java @@ -14,7 +14,6 @@ */ package org.hyperledger.besu.tests.acceptance.jsonrpc; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.Cluster; import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.ClusterConfiguration; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/NetServicesAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/NetServicesAcceptanceTest.java index dbff6f151a3..c24e90751ad 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/NetServicesAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/NetServicesAcceptanceTest.java @@ -14,7 +14,6 @@ */ package org.hyperledger.besu.tests.acceptance.jsonrpc; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.Cluster; import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.ClusterConfiguration; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/RevertReasonAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/RevertReasonAcceptanceTest.java index 9c8d610dc28..f98e682c64d 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/RevertReasonAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/RevertReasonAcceptanceTest.java @@ -17,7 +17,6 @@ import static org.hyperledger.besu.tests.web3j.generated.RevertReason.FUNC_REVERTWITHOUTREVERTREASON; import static org.hyperledger.besu.tests.web3j.generated.RevertReason.FUNC_REVERTWITHREVERTREASON; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import org.hyperledger.besu.tests.web3j.generated.RevertReason; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/Web3Sha3AcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/Web3Sha3AcceptanceTest.java index a925a276611..cb98d8173d0 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/Web3Sha3AcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/Web3Sha3AcceptanceTest.java @@ -14,7 +14,6 @@ */ package org.hyperledger.besu.tests.acceptance.jsonrpc; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; import org.junit.jupiter.api.BeforeEach; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/admin/AdminAddPeerAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/admin/AdminAddPeerAcceptanceTest.java index 6c1bd5813bd..ed9dfdc11e9 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/admin/AdminAddPeerAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/admin/AdminAddPeerAcceptanceTest.java @@ -14,7 +14,6 @@ */ package org.hyperledger.besu.tests.acceptance.jsonrpc.admin; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.Cluster; import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.ClusterConfiguration; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ipc/Web3JSupportAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ipc/Web3JSupportAcceptanceTest.java index b1887303ba2..6382793f69e 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ipc/Web3JSupportAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ipc/Web3JSupportAcceptanceTest.java @@ -20,7 +20,6 @@ import org.hyperledger.besu.ethereum.api.jsonrpc.RpcApis; import org.hyperledger.besu.ethereum.api.jsonrpc.ipc.JsonRpcIpcConfiguration; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; import java.io.IOException; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/mining/MiningAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/mining/MiningAcceptanceTest.java index 69d6d19d18e..3e8b704e8ee 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/mining/MiningAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/mining/MiningAcceptanceTest.java @@ -14,7 +14,6 @@ */ package org.hyperledger.besu.tests.acceptance.mining; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.account.Account; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/AccountLocalConfigPermissioningAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/AccountLocalConfigPermissioningAcceptanceTest.java index 4b163a4efc9..f7832f8b633 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/AccountLocalConfigPermissioningAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/AccountLocalConfigPermissioningAcceptanceTest.java @@ -14,7 +14,6 @@ */ package org.hyperledger.besu.tests.acceptance.permissioning; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.account.Account; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; import org.hyperledger.besu.tests.acceptance.dsl.transaction.account.TransferTransaction; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/AccountLocalConfigPermissioningImportAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/AccountLocalConfigPermissioningImportAcceptanceTest.java index c3a2ab6e11a..39610b8c09b 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/AccountLocalConfigPermissioningImportAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/AccountLocalConfigPermissioningImportAcceptanceTest.java @@ -15,7 +15,6 @@ package org.hyperledger.besu.tests.acceptance.permissioning; import org.hyperledger.besu.ethereum.permissioning.AllowlistPersistor; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.account.Account; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.Cluster; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/AccountSmartContractPermissioningAcceptanceTestBase.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/AccountSmartContractPermissioningAcceptanceTestBase.java index 7cad210dd74..75e66e58c3b 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/AccountSmartContractPermissioningAcceptanceTestBase.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/AccountSmartContractPermissioningAcceptanceTestBase.java @@ -15,7 +15,6 @@ package org.hyperledger.besu.tests.acceptance.permissioning; import org.hyperledger.besu.datatypes.Hash; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.account.Account; import org.hyperledger.besu.tests.acceptance.dsl.condition.Condition; import org.hyperledger.besu.tests.acceptance.dsl.condition.perm.AccountSmartContractPermissioningConditions; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/AllowlistPersistorAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/AllowlistPersistorAcceptanceTest.java index 71258222d78..c6284e691c7 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/AllowlistPersistorAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/AllowlistPersistorAcceptanceTest.java @@ -16,7 +16,6 @@ import static org.hyperledger.besu.ethereum.permissioning.AllowlistPersistor.ALLOWLIST_TYPE; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.account.Account; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/AllowlistWithDnsPersistorAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/AllowlistWithDnsPersistorAcceptanceTest.java index 08761ef6e07..ffc618b24ae 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/AllowlistWithDnsPersistorAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/AllowlistWithDnsPersistorAcceptanceTest.java @@ -20,7 +20,6 @@ import org.hyperledger.besu.ethereum.p2p.peers.EnodeURLImpl; import org.hyperledger.besu.ethereum.p2p.peers.ImmutableEnodeDnsConfiguration; import org.hyperledger.besu.plugin.data.EnodeURL; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.account.Account; import org.hyperledger.besu.tests.acceptance.dsl.condition.Condition; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/NodeLocalConfigPermissioningAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/NodeLocalConfigPermissioningAcceptanceTest.java index d889abb9fbb..54fa1ec17ab 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/NodeLocalConfigPermissioningAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/NodeLocalConfigPermissioningAcceptanceTest.java @@ -14,7 +14,6 @@ */ package org.hyperledger.besu.tests.acceptance.permissioning; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.Cluster; import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.ClusterConfiguration; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/NodeSmartContractPermissioningAcceptanceTestBase.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/NodeSmartContractPermissioningAcceptanceTestBase.java index 094dc08862b..237bc15578b 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/NodeSmartContractPermissioningAcceptanceTestBase.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/NodeSmartContractPermissioningAcceptanceTestBase.java @@ -15,7 +15,6 @@ package org.hyperledger.besu.tests.acceptance.permissioning; import org.hyperledger.besu.datatypes.Hash; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.condition.Condition; import org.hyperledger.besu.tests.acceptance.dsl.condition.perm.NodeSmartContractPermissioningConditions; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/NodeSmartContractPermissioningV2AcceptanceTestBase.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/NodeSmartContractPermissioningV2AcceptanceTestBase.java index 21afa801d0f..1c6e0484a88 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/NodeSmartContractPermissioningV2AcceptanceTestBase.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/permissioning/NodeSmartContractPermissioningV2AcceptanceTestBase.java @@ -16,7 +16,6 @@ import org.hyperledger.besu.datatypes.Hash; import org.hyperledger.besu.plugin.data.EnodeURL; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.condition.Condition; import org.hyperledger.besu.tests.acceptance.dsl.condition.perm.NodeSmartContractPermissioningV2Conditions; import org.hyperledger.besu.tests.acceptance.dsl.node.Node; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/BadCLIOptionsPluginTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/BadCLIOptionsPluginTest.java index fb35aaacf54..91c70439da9 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/BadCLIOptionsPluginTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/BadCLIOptionsPluginTest.java @@ -16,7 +16,7 @@ import static org.assertj.core.api.Assertions.assertThat; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBaseJunit5; +import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import java.io.File; @@ -34,7 +34,7 @@ import org.junit.jupiter.api.condition.DisabledOnOs; import org.junit.jupiter.api.condition.OS; -public class BadCLIOptionsPluginTest extends AcceptanceTestBaseJunit5 { +public class BadCLIOptionsPluginTest extends AcceptanceTestBase { private BesuNode node; @BeforeEach diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/BesuEventsPluginTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/BesuEventsPluginTest.java index a35309ef6f0..4906193362c 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/BesuEventsPluginTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/BesuEventsPluginTest.java @@ -14,7 +14,7 @@ */ package org.hyperledger.besu.tests.acceptance.plugins; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBaseJunit5; +import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import java.io.File; @@ -28,7 +28,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -public class BesuEventsPluginTest extends AcceptanceTestBaseJunit5 { +public class BesuEventsPluginTest extends AcceptanceTestBase { private BesuNode pluginNode; private BesuNode minerNode; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/BlockchainServiceFinalizedBlockPluginTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/BlockchainServiceFinalizedBlockPluginTest.java index dd620844b13..f599ccdaef1 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/BlockchainServiceFinalizedBlockPluginTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/BlockchainServiceFinalizedBlockPluginTest.java @@ -17,7 +17,6 @@ import static org.assertj.core.api.Assertions.assertThat; import org.hyperledger.besu.config.JsonUtil; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import java.io.IOException; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/InProcessRpcServicePluginTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/InProcessRpcServicePluginTest.java index 4dbf8fd5d18..db553e7acc6 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/InProcessRpcServicePluginTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/InProcessRpcServicePluginTest.java @@ -16,7 +16,6 @@ import static org.assertj.core.api.Assertions.assertThat; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import java.math.BigInteger; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/PermissioningPluginTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/PermissioningPluginTest.java index 86756a42082..c469802fc1e 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/PermissioningPluginTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/PermissioningPluginTest.java @@ -15,7 +15,7 @@ package org.hyperledger.besu.tests.acceptance.plugins; import org.hyperledger.besu.datatypes.Hash; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBaseJunit5; +import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.account.Account; import org.hyperledger.besu.tests.acceptance.dsl.blockchain.Amount; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; @@ -27,7 +27,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -public class PermissioningPluginTest extends AcceptanceTestBaseJunit5 { +public class PermissioningPluginTest extends AcceptanceTestBase { private BesuNode minerNode; private BesuNode aliceNode; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/PicoCLIOptionsPluginTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/PicoCLIOptionsPluginTest.java index b3a7a1ed556..230bdbe54be 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/PicoCLIOptionsPluginTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/PicoCLIOptionsPluginTest.java @@ -14,10 +14,12 @@ */ package org.hyperledger.besu.tests.acceptance.plugins; -import static org.assertj.core.api.Assertions.assertThat; - +import org.awaitility.Awaitility; import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import java.io.File; import java.io.IOException; @@ -27,67 +29,64 @@ import java.util.concurrent.TimeUnit; import java.util.stream.Stream; -import org.awaitility.Awaitility; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import static org.assertj.core.api.Assertions.assertThat; public class PicoCLIOptionsPluginTest extends AcceptanceTestBase { - private BesuNode node; + private BesuNode node; - // context: https://en.wikipedia.org/wiki/The_Magic_Words_are_Squeamish_Ossifrage - private static final String MAGIC_WORDS = "Squemish Ossifrage"; + // context: https://en.wikipedia.org/wiki/The_Magic_Words_are_Squeamish_Ossifrage + private static final String MAGIC_WORDS = "Squemish Ossifrage"; - @BeforeEach - public void setUp() throws Exception { - node = - besu.createPluginsNode( - "node1", - Collections.singletonList("testPlugins"), - Collections.singletonList("--Xplugin-test-option=" + MAGIC_WORDS)); - cluster.start(node); - } + @BeforeEach + public void setUp() throws Exception { + node = + besu.createPluginsNode( + "node1", + Collections.singletonList("testPlugins"), + Collections.singletonList("--Xplugin-test-option=" + MAGIC_WORDS)); + cluster.start(node); + } - @Test - public void shouldRegister() throws IOException { - final Path registrationFile = - node.homeDirectory().resolve("plugins/pluginLifecycle.registered"); - waitForFile(registrationFile); + @Test + public void shouldRegister() throws IOException { + final Path registrationFile = + node.homeDirectory().resolve("plugins/pluginLifecycle.registered"); + waitForFile(registrationFile); - // this assert is false as CLI will not be parsed at this point - assertThat(Files.readAllLines(registrationFile).stream().anyMatch(s -> s.contains(MAGIC_WORDS))) - .isFalse(); - } + // this assert is false as CLI will not be parsed at this point + assertThat(Files.readAllLines(registrationFile).stream().anyMatch(s -> s.contains(MAGIC_WORDS))) + .isFalse(); + } - @Test - public void shouldStart() throws IOException { - final Path registrationFile = node.homeDirectory().resolve("plugins/pluginLifecycle.started"); - waitForFile(registrationFile); + @Test + public void shouldStart() throws IOException { + final Path registrationFile = node.homeDirectory().resolve("plugins/pluginLifecycle.started"); + waitForFile(registrationFile); - // this assert is true as CLI will be parsed at this point - assertThat(Files.readAllLines(registrationFile).stream().anyMatch(s -> s.contains(MAGIC_WORDS))) - .isTrue(); - } + // this assert is true as CLI will be parsed at this point + assertThat(Files.readAllLines(registrationFile).stream().anyMatch(s -> s.contains(MAGIC_WORDS))) + .isTrue(); + } - @Test - @Disabled("No way to do a graceful shutdown of Besu at the moment.") - public void shouldStop() { - cluster.stopNode(node); - waitForFile(node.homeDirectory().resolve("plugins/pluginLifecycle.stopped")); - } + @Test + @Disabled("No way to do a graceful shutdown of Besu at the moment.") + public void shouldStop() { + cluster.stopNode(node); + waitForFile(node.homeDirectory().resolve("plugins/pluginLifecycle.stopped")); + } - private void waitForFile(final Path path) { - final File file = path.toFile(); - Awaitility.waitAtMost(30, TimeUnit.SECONDS) - .until( - () -> { - if (file.exists()) { - try (final Stream s = Files.lines(path)) { - return s.count() > 0; - } - } else { - return false; - } - }); - } + private void waitForFile(final Path path) { + final File file = path.toFile(); + Awaitility.waitAtMost(30, TimeUnit.SECONDS) + .until( + () -> { + if (file.exists()) { + try (final Stream s = Files.lines(path)) { + return s.count() > 0; + } + } else { + return false; + } + }); + } } diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/RpcEndpointServicePluginTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/RpcEndpointServicePluginTest.java index 5ad125719cf..9066128c097 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/RpcEndpointServicePluginTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/plugins/RpcEndpointServicePluginTest.java @@ -17,7 +17,6 @@ import static org.assertj.core.api.Assertions.assertThat; import org.hyperledger.besu.config.JsonUtil; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import java.io.IOException; diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/pubsub/NewPendingTransactionAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/pubsub/NewPendingTransactionAcceptanceTest.java index fe7a04c8446..7a175d59d7a 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/pubsub/NewPendingTransactionAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/pubsub/NewPendingTransactionAcceptanceTest.java @@ -15,7 +15,6 @@ package org.hyperledger.besu.tests.acceptance.pubsub; import org.hyperledger.besu.datatypes.Hash; -import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase; import org.hyperledger.besu.tests.acceptance.dsl.account.Account; import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode; import org.hyperledger.besu.tests.acceptance.dsl.pubsub.Subscription; diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthGetBlockReceipts.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthGetBlockReceipts.java index a113e4ee8e8..93ec9a950f8 100644 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthGetBlockReceipts.java +++ b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthGetBlockReceipts.java @@ -14,6 +14,7 @@ */ package org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods; +import com.google.common.base.Suppliers; import org.hyperledger.besu.datatypes.Hash; import org.hyperledger.besu.ethereum.api.jsonrpc.RpcMethod; import org.hyperledger.besu.ethereum.api.jsonrpc.internal.JsonRpcRequestContext; @@ -36,69 +37,65 @@ import java.util.Optional; import java.util.stream.Collectors; -import com.google.common.base.Suppliers; - public class EthGetBlockReceipts extends AbstractBlockParameterOrBlockHashMethod { - private final ProtocolSchedule protocolSchedule; + private final ProtocolSchedule protocolSchedule; - public EthGetBlockReceipts( - final BlockchainQueries blockchain, final ProtocolSchedule protocolSchedule) { - super(Suppliers.ofInstance(blockchain)); - this.protocolSchedule = protocolSchedule; - } + public EthGetBlockReceipts( + final BlockchainQueries blockchain, final ProtocolSchedule protocolSchedule) { + super(Suppliers.ofInstance(blockchain)); + this.protocolSchedule = protocolSchedule; + } - @Override - public String getName() { - return RpcMethod.ETH_GET_BLOCK_RECEIPTS.getMethodName(); - } + @Override + public String getName() { + return RpcMethod.ETH_GET_BLOCK_RECEIPTS.getMethodName(); + } - @Override - protected BlockParameterOrBlockHash blockParameterOrBlockHash( - final JsonRpcRequestContext request) { - try { - return request.getRequiredParameter(0, BlockParameterOrBlockHash.class); - } catch (JsonRpcParameterException e) { - throw new InvalidJsonRpcParameters( - "Invalid block or block hash parameters (index 0)", RpcErrorType.INVALID_BLOCK_PARAMS, e); + @Override + protected BlockParameterOrBlockHash blockParameterOrBlockHash( + final JsonRpcRequestContext request) { + try { + return request.getRequiredParameter(0, BlockParameterOrBlockHash.class); + } catch (JsonRpcParameterException e) { + throw new InvalidJsonRpcParameters( + "Invalid block or block hash parameters (index 0)", RpcErrorType.INVALID_BLOCK_PARAMS, e); + } } - } - @Override - protected Object resultByBlockHash(final JsonRpcRequestContext request, final Hash blockHash) { - return getBlockReceiptsResult(blockHash); - } + @Override + protected Object resultByBlockHash(final JsonRpcRequestContext request, final Hash blockHash) { + return getBlockReceiptsResult(blockHash); + } - /* - * For a given transaction, get its receipt and if it exists, wrap in a transaction receipt of the correct type - */ - private Optional txReceipt(final TransactionWithMetadata tx) { - Optional receipt = - blockchainQueries - .get() - .transactionReceiptByTransactionHash(tx.getTransaction().getHash(), protocolSchedule); - if (receipt.isPresent()) { - if (receipt.get().getReceipt().getTransactionReceiptType() == TransactionReceiptType.ROOT) { - return Optional.of(new TransactionReceiptRootResult(receipt.get())); - } else { - return Optional.of(new TransactionReceiptStatusResult(receipt.get())); - } + /* + * For a given transaction, get its receipt and if it exists, wrap in a transaction receipt of the correct type + */ + private Optional txReceipt(final TransactionWithMetadata tx) { + Optional receipt = + blockchainQueries + .get() + .transactionReceiptByTransactionHash(tx.getTransaction().getHash(), protocolSchedule); + if (receipt.isPresent()) { + if (receipt.get().getReceipt().getTransactionReceiptType() == TransactionReceiptType.ROOT) { + return Optional.of(new TransactionReceiptRootResult(receipt.get())); + } else { + return Optional.of(new TransactionReceiptStatusResult(receipt.get())); + } + } + return Optional.empty(); } - return Optional.empty(); - } - private BlockReceiptsResult getBlockReceiptsResult(final Hash blockHash) { - final List receiptList = - blockchainQueries - .get() - .blockByHash(blockHash) - .map( - block -> - block.getTransactions().stream() - .map(tx -> txReceipt(tx).get()) - .collect(Collectors.toList())) - .orElse(new ArrayList<>()); + private BlockReceiptsResult getBlockReceiptsResult(final Hash blockHash) { + final List receiptList = + blockchainQueries.get() + .blockByHash(blockHash) + .map(block -> + block.getTransactions().stream() + .map(tx -> txReceipt(tx).get()) + .collect(Collectors.toList())) + .orElse(new ArrayList<>()); - return new BlockReceiptsResult(receiptList); - } + return new BlockReceiptsResult(receiptList); + } }