From 17f4dc9a8a612042927232ddc0b956f80320933d Mon Sep 17 00:00:00 2001 From: Danno Ferrin Date: Sun, 14 Jul 2024 22:31:18 -0600 Subject: [PATCH] Update unit test (#7317) * Update parameterized unit tests so the enumerate with --dry-run * Update the prague-withdrawal.json unit test to handle current code Signed-off-by: Danno Ferrin Co-authored-by: Sally MacFarlane --- .../blockchain/ExpectBeneficiary.java | 2 +- .../blockchain/ExpectBlockNumberAbove.java | 2 +- .../dsl/condition/clique/ExpectNonceVote.java | 2 +- .../clique/ExpectedBlockHasProposer.java | 2 +- .../besu/ForkIdsNetworkConfigTest.java | 8 +++ .../chainimport/JsonBlockImporterTest.java | 7 +++ .../cli/NetworkDeprecationMessageTest.java | 8 +++ .../clique/CliqueProtocolScheduleTest.java | 2 +- .../blockcreation/CliqueBlockCreatorTest.java | 7 ++- .../CliqueExtraDataValidationRuleTest.java | 2 +- .../VoteValidationRuleTest.java | 10 +++- .../jsonrpc/methods/CliqueProposalsTest.java | 2 +- .../besu/consensus/common/bft/VoteTest.java | 2 +- .../AbstractVoteProposerMethodTest.java | 2 +- .../consensus/ibft/BftBlockHashingTest.java | 2 +- .../methods/IbftGetPendingVotesTest.java | 2 +- .../api/graphql/EthGraphQLHttpBySpecTest.java | 9 ++++ .../JsonRpcHttpServiceParameterizedTest.java | 8 +++ .../jsonrpc/RpcErrorTypeConverterTest.java | 8 +++ .../bonsai/DebugJsonRpcHttpBySpecTest.java | 10 ++++ .../DebugTraceJsonRpcHttpBySpecTest.java | 10 ++++ .../EthByzantiumJsonRpcHttpBySpecTest.java | 10 ++++ .../bonsai/EthJsonRpcHttpBySpecTest.java | 10 ++++ .../bonsai/TraceJsonRpcHttpBySpecTest.java | 10 ++++ .../api/jsonrpc/context/ContextKeyTest.java | 8 +++ .../forest/DebugJsonRpcHttpBySpecTest.java | 10 ++++ .../DebugTraceJsonRpcHttpBySpecTest.java | 10 ++++ .../EthByzantiumJsonRpcHttpBySpecTest.java | 10 ++++ .../forest/EthJsonRpcHttpBySpecTest.java | 10 ++++ .../forest/TraceJsonRpcHttpBySpecTest.java | 10 ++++ .../internal/methods/TraceFilterTest.java | 8 +++ ...endingPermissionTransactionFilterTest.java | 8 +++ .../jsonrpc/timeout/TimeoutHandlerTest.java | 9 ++++ .../ethereum/api/query/BackendQueryTest.java | 8 +++ .../HashRateMiningCoordinatorTest.java | 8 +++ .../besu/ethereum/chain/GenesisStateTest.java | 8 +++ .../besu/ethereum/core/UtilTest.java | 2 +- .../encoding/BlobTransactionEncodingTest.java | 8 +++ .../feemarket/BaseFeeMarketBaseFeeTest.java | 8 +++ .../CoinbaseFeePriceCalculatorTest.java | 8 +++ .../TransactionPriceCalculatorTest.java | 8 +++ .../ForkIdBackwardCompatibilityTest.java | 8 +++ .../ethereum/mainnet/IntrinsicGasTest.java | 10 ++++ .../PragueWithdrawalRequestValidatorTest.java | 8 +++ .../ethereum/mainnet/RefundSstoreGasTest.java | 9 ++++ .../WithdrawalRequestValidatorTest.java | 8 +++ ...yValidationRuleFixedBaseFeeMarketTest.java | 8 +++ .../GasLimitElasticityValidationRuleTest.java | 8 +++ ...tyValidationRuleZeroBaseFeeMarketTest.java | 8 +++ ...sLimitRangeAndDeltaValidationRuleTest.java | 8 +++ .../GasUsageValidationRuleTest.java | 8 +++ .../ProofOfWorkValidationRuleTest.java | 8 +++ .../util/BlockchainUtilParameterizedTest.java | 8 +++ .../eth/sync/ChainHeadTrackerTest.java | 9 ++++ .../CheckPointSyncChainDownloaderTest.java | 14 ++++- .../fastsync/FastDownloaderFactoryTest.java | 8 +++ .../sync/fastsync/FastSyncActionsTest.java | 8 +++ .../fastsync/FastSyncChainDownloaderTest.java | 12 ++++- .../sync/fastsync/FastSyncDownloaderTest.java | 8 +++ .../fastsync/PivotBlockConfirmerTest.java | 8 +++ .../fastsync/PivotBlockRetrieverTest.java | 8 +++ .../FastWorldDownloadStateTest.java | 8 +++ .../fullsync/FullSyncChainDownloaderTest.java | 12 ++++- ...DownloaderTotalTerminalDifficultyTest.java | 12 ++++- .../sync/fullsync/FullSyncDownloaderTest.java | 12 ++++- .../fullsync/FullSyncTargetManagerTest.java | 12 ++++- .../snapsync/SnapWorldDownloadStateTest.java | 8 +++ .../StorageTrieNodeHealingRequestTest.java | 10 ++++ ...neCommonAncestorTaskParameterizedTest.java | 8 +++ .../eth/sync/tasks/PersistBlockTaskTest.java | 8 +++ ...TransactionPoolReplacementHandlerTest.java | 8 +++ ...sactionReplacementByFeeMarketRuleTest.java | 8 +++ ...nsactionReplacementByGasPriceRuleTest.java | 8 +++ .../TransactionReplacementRulesTest.java | 8 +++ .../eth/transactions/layered/LayersTest.java | 8 +++ .../besu/evmtool/EvmToolSpecTests.java | 8 +++ .../besu/evmtool/t8n/prague-withdrawal.json | 53 ++++++++++--------- .../internal/PeerRequirementCombineTest.java | 8 +++ .../ethereum/p2p/peers/EnodeURLImplTest.java | 5 ++ .../netty/TLSContextFactoryTest.java | 8 +++ .../besu/evm/code/EOFLayoutTest.java | 8 +++ .../CancunGasCalculatorTest.java | 8 +++ .../besu/evm/internal/WordsTest.java | 8 +++ .../evm/operations/ChainIdOperationTest.java | 8 +++ ...stantinopleSStoreOperationGasCostTest.java | 8 +++ .../LondonSStoreOperationGasCostTest.java | 8 +++ .../evm/operations/MCopyOperationTest.java | 8 +++ .../evm/operations/SStoreOperationTest.java | 8 +++ .../besu/evm/operations/SarOperationTest.java | 9 ++++ .../operations/SelfDestructOperationTest.java | 8 +++ .../besu/evm/operations/ShlOperationTest.java | 9 ++++ .../besu/evm/operations/ShrOperationTest.java | 9 ++++ .../BLAKE2BFPrecompileContractTest.java | 8 +++ .../BLS12G1AddPrecompiledContractTest.java | 8 +++ .../BLS12G1MulPrecompiledContractTest.java | 8 +++ ...LS12G1MultiExpPrecompiledContractTest.java | 8 +++ .../BLS12G2AddPrecompiledContractTest.java | 8 +++ .../BLS12G2MulPrecompiledContractTest.java | 8 +++ ...LS12G2MultiExpPrecompiledContractTest.java | 8 +++ ...LS12MapFp2ToG2PrecompiledContractTest.java | 8 +++ ...BLS12MapFpToG1PrecompiledContractTest.java | 8 +++ .../BLS12PairingPrecompiledContractTest.java | 8 +++ .../ECRECPrecompiledContractTest.java | 8 +++ .../KZGPointEvalPrecompileContractTest.java | 8 +++ .../MODEXPPrecompiledContractTest.java | 8 +++ 105 files changed, 817 insertions(+), 50 deletions(-) diff --git a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/blockchain/ExpectBeneficiary.java b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/blockchain/ExpectBeneficiary.java index 25abc07828..fe765cbeae 100644 --- a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/blockchain/ExpectBeneficiary.java +++ b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/blockchain/ExpectBeneficiary.java @@ -14,7 +14,7 @@ */ package org.hyperledger.besu.tests.acceptance.dsl.condition.blockchain; -import static org.assertj.core.api.Java6Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import org.hyperledger.besu.tests.acceptance.dsl.WaitUtils; import org.hyperledger.besu.tests.acceptance.dsl.condition.Condition; diff --git a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/blockchain/ExpectBlockNumberAbove.java b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/blockchain/ExpectBlockNumberAbove.java index 60fa6ad546..6919581bf6 100644 --- a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/blockchain/ExpectBlockNumberAbove.java +++ b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/blockchain/ExpectBlockNumberAbove.java @@ -14,7 +14,7 @@ */ package org.hyperledger.besu.tests.acceptance.dsl.condition.blockchain; -import static org.assertj.core.api.Java6Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import org.hyperledger.besu.tests.acceptance.dsl.WaitUtils; import org.hyperledger.besu.tests.acceptance.dsl.condition.Condition; diff --git a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/clique/ExpectNonceVote.java b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/clique/ExpectNonceVote.java index 6882890c14..1e8f4b8a99 100644 --- a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/clique/ExpectNonceVote.java +++ b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/clique/ExpectNonceVote.java @@ -14,7 +14,7 @@ */ package org.hyperledger.besu.tests.acceptance.dsl.condition.clique; -import static org.assertj.core.api.Java6Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.hyperledger.besu.tests.acceptance.dsl.condition.clique.ExpectNonceVote.CLIQUE_NONCE_VOTE.AUTH; import org.hyperledger.besu.tests.acceptance.dsl.WaitUtils; diff --git a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/clique/ExpectedBlockHasProposer.java b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/clique/ExpectedBlockHasProposer.java index 53b166c714..4abba67a0d 100644 --- a/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/clique/ExpectedBlockHasProposer.java +++ b/acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/condition/clique/ExpectedBlockHasProposer.java @@ -14,7 +14,7 @@ */ package org.hyperledger.besu.tests.acceptance.dsl.condition.clique; -import static org.assertj.core.api.Java6Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import org.hyperledger.besu.consensus.clique.CliqueBlockHeaderFunctions; import org.hyperledger.besu.consensus.clique.CliqueExtraData; diff --git a/besu/src/test/java/org/hyperledger/besu/ForkIdsNetworkConfigTest.java b/besu/src/test/java/org/hyperledger/besu/ForkIdsNetworkConfigTest.java index ae338f27ca..fe5077acc6 100644 --- a/besu/src/test/java/org/hyperledger/besu/ForkIdsNetworkConfigTest.java +++ b/besu/src/test/java/org/hyperledger/besu/ForkIdsNetworkConfigTest.java @@ -44,6 +44,7 @@ import java.util.stream.Stream; import com.google.common.collect.Streams; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import org.junit.runner.RunWith; @@ -207,4 +208,11 @@ public class ForkIdsNetworkConfigTest { MilestoneStreamingProtocolSchedule::streamMilestoneBlocks); } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/besu/src/test/java/org/hyperledger/besu/chainimport/JsonBlockImporterTest.java b/besu/src/test/java/org/hyperledger/besu/chainimport/JsonBlockImporterTest.java index 522f268c57..73015afd00 100644 --- a/besu/src/test/java/org/hyperledger/besu/chainimport/JsonBlockImporterTest.java +++ b/besu/src/test/java/org/hyperledger/besu/chainimport/JsonBlockImporterTest.java @@ -410,6 +410,13 @@ public abstract class JsonBlockImporterTest { + genesisConfigFile.getConfigOptions().getConsensusEngine()); } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } protected Block getBlockAt(final Blockchain blockchain, final long blockNumber) { diff --git a/besu/src/test/java/org/hyperledger/besu/cli/NetworkDeprecationMessageTest.java b/besu/src/test/java/org/hyperledger/besu/cli/NetworkDeprecationMessageTest.java index e140db8c2a..87be2a699e 100644 --- a/besu/src/test/java/org/hyperledger/besu/cli/NetworkDeprecationMessageTest.java +++ b/besu/src/test/java/org/hyperledger/besu/cli/NetworkDeprecationMessageTest.java @@ -20,6 +20,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; import org.hyperledger.besu.cli.config.NetworkName; import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.EnumSource; @@ -45,4 +46,11 @@ class NetworkDeprecationMessageTest { assertThatThrownBy(() -> NetworkDeprecationMessage.generate(network)) .isInstanceOf(AssertionError.class); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/CliqueProtocolScheduleTest.java b/consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/CliqueProtocolScheduleTest.java index 30a3967da9..35f959e45b 100644 --- a/consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/CliqueProtocolScheduleTest.java +++ b/consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/CliqueProtocolScheduleTest.java @@ -14,8 +14,8 @@ */ package org.hyperledger.besu.consensus.clique; +import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import static org.assertj.core.api.Java6Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/blockcreation/CliqueBlockCreatorTest.java b/consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/blockcreation/CliqueBlockCreatorTest.java index 7dcbfa34ba..485b2aff79 100644 --- a/consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/blockcreation/CliqueBlockCreatorTest.java +++ b/consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/blockcreation/CliqueBlockCreatorTest.java @@ -14,7 +14,7 @@ */ package org.hyperledger.besu.consensus.clique.blockcreation; -import static org.assertj.core.api.Java6Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.hyperledger.besu.ethereum.core.InMemoryKeyValueStorageProvider.createInMemoryBlockchain; import static org.hyperledger.besu.ethereum.core.InMemoryKeyValueStorageProvider.createInMemoryWorldStateArchive; import static org.mockito.ArgumentMatchers.any; @@ -75,7 +75,6 @@ import java.util.Optional; import com.google.common.collect.Lists; import org.apache.tuweni.bytes.Bytes; -import org.assertj.core.api.Java6Assertions; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; @@ -98,7 +97,7 @@ public class CliqueBlockCreatorTest { private VoteProvider voteProvider; @BeforeEach - public void setup() { + void setup() { protocolSchedule = CliqueProtocolSchedule.create( GenesisConfigFile.DEFAULT.getConfigOptions(), @@ -160,7 +159,7 @@ public class CliqueBlockCreatorTest { final Block createdBlock = blockCreator.createBlock(5L).getBlock(); - Java6Assertions.assertThat(CliqueHelpers.getProposerOfBlock(createdBlock.getHeader())) + assertThat(CliqueHelpers.getProposerOfBlock(createdBlock.getHeader())) .isEqualTo(proposerAddress); } diff --git a/consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/headervalidationrules/CliqueExtraDataValidationRuleTest.java b/consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/headervalidationrules/CliqueExtraDataValidationRuleTest.java index 0d30cdf655..afcc7e23c2 100644 --- a/consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/headervalidationrules/CliqueExtraDataValidationRuleTest.java +++ b/consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/headervalidationrules/CliqueExtraDataValidationRuleTest.java @@ -14,7 +14,7 @@ */ package org.hyperledger.besu.consensus.clique.headervalidationrules; -import static org.assertj.core.api.Java6Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/headervalidationrules/VoteValidationRuleTest.java b/consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/headervalidationrules/VoteValidationRuleTest.java index fdb6885957..0ba0e5f3c8 100644 --- a/consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/headervalidationrules/VoteValidationRuleTest.java +++ b/consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/headervalidationrules/VoteValidationRuleTest.java @@ -14,7 +14,7 @@ */ package org.hyperledger.besu.consensus.clique.headervalidationrules; -import static org.assertj.core.api.Java6Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import org.hyperledger.besu.consensus.clique.CliqueBlockInterface; import org.hyperledger.besu.ethereum.core.BlockHeader; @@ -22,6 +22,7 @@ import org.hyperledger.besu.ethereum.core.BlockHeaderTestFixture; import java.util.stream.Stream; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -52,4 +53,11 @@ public class VoteValidationRuleTest { assertThat(uut.validate(header, null)).isEqualTo(expectedResult); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/jsonrpc/methods/CliqueProposalsTest.java b/consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/jsonrpc/methods/CliqueProposalsTest.java index 50dc379b57..cdfbeb6299 100644 --- a/consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/jsonrpc/methods/CliqueProposalsTest.java +++ b/consensus/clique/src/test/java/org/hyperledger/besu/consensus/clique/jsonrpc/methods/CliqueProposalsTest.java @@ -14,7 +14,7 @@ */ package org.hyperledger.besu.consensus.clique.jsonrpc.methods; -import static org.assertj.core.api.Java6Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import org.hyperledger.besu.consensus.common.jsonrpc.AbstractVoteProposerMethod; import org.hyperledger.besu.consensus.common.jsonrpc.AbstractVoteProposerMethodTest; diff --git a/consensus/common/src/test/java/org/hyperledger/besu/consensus/common/bft/VoteTest.java b/consensus/common/src/test/java/org/hyperledger/besu/consensus/common/bft/VoteTest.java index b01a3a97c6..ec37b1d4bb 100644 --- a/consensus/common/src/test/java/org/hyperledger/besu/consensus/common/bft/VoteTest.java +++ b/consensus/common/src/test/java/org/hyperledger/besu/consensus/common/bft/VoteTest.java @@ -14,7 +14,7 @@ */ package org.hyperledger.besu.consensus.common.bft; -import static org.assertj.core.api.Java6Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import org.hyperledger.besu.datatypes.Address; diff --git a/consensus/common/src/test/java/org/hyperledger/besu/consensus/common/jsonrpc/AbstractVoteProposerMethodTest.java b/consensus/common/src/test/java/org/hyperledger/besu/consensus/common/jsonrpc/AbstractVoteProposerMethodTest.java index a59bd556e4..eefe1784c8 100644 --- a/consensus/common/src/test/java/org/hyperledger/besu/consensus/common/jsonrpc/AbstractVoteProposerMethodTest.java +++ b/consensus/common/src/test/java/org/hyperledger/besu/consensus/common/jsonrpc/AbstractVoteProposerMethodTest.java @@ -14,7 +14,7 @@ */ package org.hyperledger.besu.consensus.common.jsonrpc; -import static org.assertj.core.api.Java6Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; diff --git a/consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/BftBlockHashingTest.java b/consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/BftBlockHashingTest.java index 7d5362ff7c..1b821c78c9 100644 --- a/consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/BftBlockHashingTest.java +++ b/consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/BftBlockHashingTest.java @@ -15,7 +15,7 @@ package org.hyperledger.besu.consensus.ibft; import static java.util.Collections.emptyList; -import static org.assertj.core.api.Java6Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import org.hyperledger.besu.consensus.common.bft.BftBlockHashing; import org.hyperledger.besu.consensus.common.bft.BftBlockHeaderFunctions; diff --git a/consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/jsonrpc/methods/IbftGetPendingVotesTest.java b/consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/jsonrpc/methods/IbftGetPendingVotesTest.java index ddede6aefe..b3d8cd43cc 100644 --- a/consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/jsonrpc/methods/IbftGetPendingVotesTest.java +++ b/consensus/ibft/src/test/java/org/hyperledger/besu/consensus/ibft/jsonrpc/methods/IbftGetPendingVotesTest.java @@ -14,7 +14,7 @@ */ package org.hyperledger.besu.consensus.ibft.jsonrpc.methods; -import static org.assertj.core.api.Java6Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import org.hyperledger.besu.consensus.common.jsonrpc.AbstractVoteProposerMethod; import org.hyperledger.besu.consensus.common.jsonrpc.AbstractVoteProposerMethodTest; diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/graphql/EthGraphQLHttpBySpecTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/graphql/EthGraphQLHttpBySpecTest.java index 4cd3164600..df620d7c1c 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/graphql/EthGraphQLHttpBySpecTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/graphql/EthGraphQLHttpBySpecTest.java @@ -15,6 +15,7 @@ package org.hyperledger.besu.ethereum.api.graphql; import static com.google.common.base.Preconditions.checkState; +import static org.assertj.core.api.Assertions.assertThat; import java.io.IOException; import java.net.URISyntaxException; @@ -31,6 +32,7 @@ import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -83,4 +85,11 @@ public class EthGraphQLHttpBySpecTest extends AbstractEthGraphQLHttpServiceTest Assertions.assertThat(resp.code()).isEqualTo(expectedStatusCode); } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/JsonRpcHttpServiceParameterizedTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/JsonRpcHttpServiceParameterizedTest.java index a93575aa8f..a561079e7c 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/JsonRpcHttpServiceParameterizedTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/JsonRpcHttpServiceParameterizedTest.java @@ -27,6 +27,7 @@ import okhttp3.RequestBody; import okhttp3.Response; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -60,4 +61,11 @@ public class JsonRpcHttpServiceParameterizedTest extends JsonRpcHttpServiceTestB json, null, expectedError.getCode(), expectedError.getMessage()); } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/RpcErrorTypeConverterTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/RpcErrorTypeConverterTest.java index 8dbee4bf91..a54057f8f4 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/RpcErrorTypeConverterTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/RpcErrorTypeConverterTest.java @@ -22,6 +22,7 @@ import org.hyperledger.besu.ethereum.transaction.TransactionInvalidReason; import java.util.Arrays; import java.util.Collection; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -85,4 +86,11 @@ public class RpcErrorTypeConverterTest { assertThat(JsonRpcErrorConverter.convertTransactionInvalidReason(txInvalidReason)) .isEqualTo(expectedJsonRpcError); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/bonsai/DebugJsonRpcHttpBySpecTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/bonsai/DebugJsonRpcHttpBySpecTest.java index 0ee3388f4e..e1a13f1a80 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/bonsai/DebugJsonRpcHttpBySpecTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/bonsai/DebugJsonRpcHttpBySpecTest.java @@ -14,9 +14,12 @@ */ package org.hyperledger.besu.ethereum.api.jsonrpc.bonsai; +import static org.assertj.core.api.Assertions.assertThat; + import org.hyperledger.besu.ethereum.api.jsonrpc.AbstractJsonRpcHttpBySpecTest; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class DebugJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpecTest { @@ -33,4 +36,11 @@ public class DebugJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpecTest { "debug/account-at", "debug/batch-send-raw-transaction", "debug/trace-transaction" }); // storageRange and accountRange are not working with bonsai trie } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/bonsai/DebugTraceJsonRpcHttpBySpecTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/bonsai/DebugTraceJsonRpcHttpBySpecTest.java index 37b2cedf7c..fbe3f32196 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/bonsai/DebugTraceJsonRpcHttpBySpecTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/bonsai/DebugTraceJsonRpcHttpBySpecTest.java @@ -14,11 +14,14 @@ */ package org.hyperledger.besu.ethereum.api.jsonrpc.bonsai; +import static org.assertj.core.api.Assertions.assertThat; + import org.hyperledger.besu.ethereum.api.jsonrpc.AbstractJsonRpcHttpBySpecTest; import org.hyperledger.besu.ethereum.core.BlockchainSetupUtil; import org.hyperledger.besu.plugin.services.storage.DataStorageFormat; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class DebugTraceJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpecTest { @@ -38,4 +41,11 @@ public class DebugTraceJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpecTe public static Object[][] specs() { return AbstractJsonRpcHttpBySpecTest.findSpecFiles(new String[] {"debug/trace-call"}); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/bonsai/EthByzantiumJsonRpcHttpBySpecTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/bonsai/EthByzantiumJsonRpcHttpBySpecTest.java index 358aeb1554..f1b6b695a8 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/bonsai/EthByzantiumJsonRpcHttpBySpecTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/bonsai/EthByzantiumJsonRpcHttpBySpecTest.java @@ -14,11 +14,14 @@ */ package org.hyperledger.besu.ethereum.api.jsonrpc.bonsai; +import static org.assertj.core.api.Assertions.assertThat; + import org.hyperledger.besu.ethereum.api.jsonrpc.AbstractJsonRpcHttpBySpecTest; import org.hyperledger.besu.ethereum.core.BlockchainSetupUtil; import org.hyperledger.besu.plugin.services.storage.DataStorageFormat; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class EthByzantiumJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpecTest { @@ -38,4 +41,11 @@ public class EthByzantiumJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpec public static Object[][] specs() { return AbstractJsonRpcHttpBySpecTest.findSpecFiles(new String[] {"eth_latest"}); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/bonsai/EthJsonRpcHttpBySpecTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/bonsai/EthJsonRpcHttpBySpecTest.java index 9dc7d193c8..1bb5f801eb 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/bonsai/EthJsonRpcHttpBySpecTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/bonsai/EthJsonRpcHttpBySpecTest.java @@ -14,9 +14,12 @@ */ package org.hyperledger.besu.ethereum.api.jsonrpc.bonsai; +import static org.assertj.core.api.Assertions.assertThat; + import org.hyperledger.besu.ethereum.api.jsonrpc.AbstractJsonRpcHttpBySpecTest; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class EthJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpecTest { @@ -30,4 +33,11 @@ public class EthJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpecTest { public static Object[][] specs() { return findSpecFiles(new String[] {"eth"}); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/bonsai/TraceJsonRpcHttpBySpecTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/bonsai/TraceJsonRpcHttpBySpecTest.java index a3bf6fc51d..51d573ddae 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/bonsai/TraceJsonRpcHttpBySpecTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/bonsai/TraceJsonRpcHttpBySpecTest.java @@ -14,11 +14,14 @@ */ package org.hyperledger.besu.ethereum.api.jsonrpc.bonsai; +import static org.assertj.core.api.Assertions.assertThat; + import org.hyperledger.besu.ethereum.api.jsonrpc.AbstractJsonRpcHttpBySpecTest; import org.hyperledger.besu.ethereum.core.BlockchainSetupUtil; import org.hyperledger.besu.plugin.services.storage.DataStorageFormat; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class TraceJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpecTest { @@ -52,4 +55,11 @@ public class TraceJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpecTest { "trace/specs/trace-raw-transaction" }); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/context/ContextKeyTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/context/ContextKeyTest.java index a31bcb96d8..ed2574170e 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/context/ContextKeyTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/context/ContextKeyTest.java @@ -26,6 +26,7 @@ import java.util.function.Supplier; import io.vertx.core.json.JsonObject; import io.vertx.ext.web.RoutingContext; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -66,4 +67,11 @@ public class ContextKeyTest { private static Supplier supplier(final T value) { return () -> value; } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/forest/DebugJsonRpcHttpBySpecTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/forest/DebugJsonRpcHttpBySpecTest.java index 562b4c2572..bc8d4178ed 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/forest/DebugJsonRpcHttpBySpecTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/forest/DebugJsonRpcHttpBySpecTest.java @@ -14,9 +14,12 @@ */ package org.hyperledger.besu.ethereum.api.jsonrpc.forest; +import static org.assertj.core.api.Assertions.assertThat; + import org.hyperledger.besu.ethereum.api.jsonrpc.AbstractJsonRpcHttpBySpecTest; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class DebugJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpecTest { @@ -37,4 +40,11 @@ public class DebugJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpecTest { "debug/storage-range" }); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/forest/DebugTraceJsonRpcHttpBySpecTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/forest/DebugTraceJsonRpcHttpBySpecTest.java index 89b79c2af3..cdedc3438b 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/forest/DebugTraceJsonRpcHttpBySpecTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/forest/DebugTraceJsonRpcHttpBySpecTest.java @@ -14,11 +14,14 @@ */ package org.hyperledger.besu.ethereum.api.jsonrpc.forest; +import static org.assertj.core.api.Assertions.assertThat; + import org.hyperledger.besu.ethereum.api.jsonrpc.AbstractJsonRpcHttpBySpecTest; import org.hyperledger.besu.ethereum.core.BlockchainSetupUtil; import org.hyperledger.besu.plugin.services.storage.DataStorageFormat; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class DebugTraceJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpecTest { @@ -38,4 +41,11 @@ public class DebugTraceJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpecTe public static Object[][] specs() { return AbstractJsonRpcHttpBySpecTest.findSpecFiles(new String[] {"debug/trace-call"}); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/forest/EthByzantiumJsonRpcHttpBySpecTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/forest/EthByzantiumJsonRpcHttpBySpecTest.java index 1639297992..c7c2d131a1 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/forest/EthByzantiumJsonRpcHttpBySpecTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/forest/EthByzantiumJsonRpcHttpBySpecTest.java @@ -14,11 +14,14 @@ */ package org.hyperledger.besu.ethereum.api.jsonrpc.forest; +import static org.assertj.core.api.Assertions.assertThat; + import org.hyperledger.besu.ethereum.api.jsonrpc.AbstractJsonRpcHttpBySpecTest; import org.hyperledger.besu.ethereum.core.BlockchainSetupUtil; import org.hyperledger.besu.plugin.services.storage.DataStorageFormat; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class EthByzantiumJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpecTest { @@ -38,4 +41,11 @@ public class EthByzantiumJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpec public static Object[][] specs() { return AbstractJsonRpcHttpBySpecTest.findSpecFiles(new String[] {"eth_latest"}); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/forest/EthJsonRpcHttpBySpecTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/forest/EthJsonRpcHttpBySpecTest.java index 277f1b89d0..041c0c711e 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/forest/EthJsonRpcHttpBySpecTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/forest/EthJsonRpcHttpBySpecTest.java @@ -14,9 +14,12 @@ */ package org.hyperledger.besu.ethereum.api.jsonrpc.forest; +import static org.assertj.core.api.Assertions.assertThat; + import org.hyperledger.besu.ethereum.api.jsonrpc.AbstractJsonRpcHttpBySpecTest; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class EthJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpecTest { @@ -30,4 +33,11 @@ public class EthJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpecTest { public static Object[][] specs() { return findSpecFiles(new String[] {"eth"}); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/forest/TraceJsonRpcHttpBySpecTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/forest/TraceJsonRpcHttpBySpecTest.java index d71c28a223..b33be91005 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/forest/TraceJsonRpcHttpBySpecTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/forest/TraceJsonRpcHttpBySpecTest.java @@ -14,11 +14,14 @@ */ package org.hyperledger.besu.ethereum.api.jsonrpc.forest; +import static org.assertj.core.api.Assertions.assertThat; + import org.hyperledger.besu.ethereum.api.jsonrpc.AbstractJsonRpcHttpBySpecTest; import org.hyperledger.besu.ethereum.core.BlockchainSetupUtil; import org.hyperledger.besu.plugin.services.storage.DataStorageFormat; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; public class TraceJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpecTest { @@ -52,4 +55,11 @@ public class TraceJsonRpcHttpBySpecTest extends AbstractJsonRpcHttpBySpecTest { "trace/specs/trace-raw-transaction" }); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/TraceFilterTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/TraceFilterTest.java index 6a9d4da03d..c5c03f6b11 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/TraceFilterTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/TraceFilterTest.java @@ -29,6 +29,7 @@ import org.hyperledger.besu.ethereum.mainnet.ProtocolSchedule; import java.util.function.Supplier; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; @@ -76,4 +77,11 @@ public class TraceFilterTest { final JsonRpcErrorResponse errorResponse = (JsonRpcErrorResponse) response; assertThat(errorResponse.getErrorType()).isEqualTo(RpcErrorType.EXCEEDS_RPC_MAX_BLOCK_RANGE); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/transaction/pool/PendingPermissionTransactionFilterTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/transaction/pool/PendingPermissionTransactionFilterTest.java index b08e5f7e8d..ada560adb0 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/transaction/pool/PendingPermissionTransactionFilterTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/transaction/pool/PendingPermissionTransactionFilterTest.java @@ -39,6 +39,7 @@ import java.util.List; import java.util.Optional; import java.util.Set; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -126,4 +127,11 @@ public class PendingPermissionTransactionFilterTest { } return new LinkedHashSet<>(pendingTransactionList); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/timeout/TimeoutHandlerTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/timeout/TimeoutHandlerTest.java index c8047b806c..2fd96d6b98 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/timeout/TimeoutHandlerTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/timeout/TimeoutHandlerTest.java @@ -14,6 +14,7 @@ */ package org.hyperledger.besu.ethereum.api.jsonrpc.timeout; +import static org.assertj.core.api.Assertions.assertThat; import static org.hyperledger.besu.ethereum.api.jsonrpc.RpcMethod.ETH_BLOCK_NUMBER; import static org.hyperledger.besu.ethereum.api.jsonrpc.RpcMethod.ETH_GET_LOGS; import static org.mockito.ArgumentMatchers.any; @@ -39,6 +40,7 @@ import io.vertx.core.Handler; import io.vertx.core.Vertx; import io.vertx.core.json.JsonObject; import io.vertx.ext.web.RoutingContext; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import org.mockito.Mockito; @@ -86,4 +88,11 @@ public class TimeoutHandlerTest { .setTimer(eq(TimeUnit.SECONDS.toMillis(timeoutSec)), any()); verify(ctx, times(timerMustBeSet ? 1 : 0)).addBodyEndHandler(any()); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/query/BackendQueryTest.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/query/BackendQueryTest.java index 20eaf656ed..4c5c2679ee 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/query/BackendQueryTest.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/query/BackendQueryTest.java @@ -20,6 +20,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; import java.util.function.Supplier; import java.util.stream.Stream; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -52,4 +53,11 @@ public class BackendQueryTest { assertThat(BackendQuery.runIfAlive(() -> wantReturn, alive)).isEqualTo(wantReturn); } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/blockcreation/src/test/java/org/hyperledger/besu/ethereum/blockcreation/HashRateMiningCoordinatorTest.java b/ethereum/blockcreation/src/test/java/org/hyperledger/besu/ethereum/blockcreation/HashRateMiningCoordinatorTest.java index 985870c6fb..73e122b620 100644 --- a/ethereum/blockcreation/src/test/java/org/hyperledger/besu/ethereum/blockcreation/HashRateMiningCoordinatorTest.java +++ b/ethereum/blockcreation/src/test/java/org/hyperledger/besu/ethereum/blockcreation/HashRateMiningCoordinatorTest.java @@ -24,6 +24,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.UUID; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -62,4 +63,11 @@ public class HashRateMiningCoordinatorTest { assertThat(miningCoordinator.hashesPerSecond()).contains(wantTotalHashrate); } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/chain/GenesisStateTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/chain/GenesisStateTest.java index ea1eb04414..70c1e64bd1 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/chain/GenesisStateTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/chain/GenesisStateTest.java @@ -32,6 +32,7 @@ import java.util.stream.Stream; import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.units.bigints.UInt256; import org.bouncycastle.util.encoders.Hex; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -331,4 +332,11 @@ final class GenesisStateTest { Hash.fromHexString( "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421")); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/UtilTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/UtilTest.java index f5df655236..39b804abe0 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/UtilTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/UtilTest.java @@ -14,7 +14,7 @@ */ package org.hyperledger.besu.ethereum.core; -import static org.assertj.core.api.Java6Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThat; import org.junit.jupiter.api.Test; diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/encoding/BlobTransactionEncodingTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/encoding/BlobTransactionEncodingTest.java index b847d0bb72..e53c1b50e0 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/encoding/BlobTransactionEncodingTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/encoding/BlobTransactionEncodingTest.java @@ -27,6 +27,7 @@ import java.nio.charset.StandardCharsets; import java.util.stream.Stream; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -117,4 +118,11 @@ public class BlobTransactionEncodingTest { : bytes.toString(); } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/feemarket/BaseFeeMarketBaseFeeTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/feemarket/BaseFeeMarketBaseFeeTest.java index d6d94c8453..e657c5c2e2 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/feemarket/BaseFeeMarketBaseFeeTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/feemarket/BaseFeeMarketBaseFeeTest.java @@ -30,6 +30,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Charsets; import com.google.common.io.Resources; import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -99,4 +100,11 @@ public class BaseFeeMarketBaseFeeTest { this.expectedBaseFee = expectedBaseFee; } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/feemarket/CoinbaseFeePriceCalculatorTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/feemarket/CoinbaseFeePriceCalculatorTest.java index 2706444f83..1da9a689cf 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/feemarket/CoinbaseFeePriceCalculatorTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/feemarket/CoinbaseFeePriceCalculatorTest.java @@ -21,6 +21,7 @@ import org.hyperledger.besu.datatypes.Wei; import java.util.Optional; import java.util.stream.Stream; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -54,4 +55,11 @@ public class CoinbaseFeePriceCalculatorTest { assertThat(coinbaseFeePriceCalculator.price(coinbaseFee, transactionGasPrice, baseFee)) .isEqualByComparingTo(expectedPrice); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/feemarket/TransactionPriceCalculatorTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/feemarket/TransactionPriceCalculatorTest.java index c23061ac8f..df07fd1f75 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/feemarket/TransactionPriceCalculatorTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/core/feemarket/TransactionPriceCalculatorTest.java @@ -29,6 +29,7 @@ import java.util.Collections; import java.util.Optional; import java.util.stream.Stream; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -146,4 +147,11 @@ public class TransactionPriceCalculatorTest { baseFee)) .isEqualByComparingTo(expectedPrice); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/forkid/ForkIdBackwardCompatibilityTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/forkid/ForkIdBackwardCompatibilityTest.java index cd28e6e9aa..84c24bc9a2 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/forkid/ForkIdBackwardCompatibilityTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/forkid/ForkIdBackwardCompatibilityTest.java @@ -24,6 +24,7 @@ import java.util.List; import java.util.stream.Stream; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -99,4 +100,11 @@ public class ForkIdBackwardCompatibilityTest { assertThat(forkIdManager.getForkIdForChainHead()) .isEqualTo(legacyEth64 ? legacyForkId : wantForkId); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/IntrinsicGasTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/IntrinsicGasTest.java index a6ae23724e..bb9ce2b495 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/IntrinsicGasTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/IntrinsicGasTest.java @@ -14,6 +14,8 @@ */ package org.hyperledger.besu.ethereum.mainnet; +import static org.assertj.core.api.Assertions.assertThat; + import org.hyperledger.besu.ethereum.core.Transaction; import org.hyperledger.besu.ethereum.rlp.RLP; import org.hyperledger.besu.evm.gascalculator.FrontierGasCalculator; @@ -24,6 +26,7 @@ import java.util.stream.Stream; import org.apache.tuweni.bytes.Bytes; import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -90,4 +93,11 @@ public class IntrinsicGasTest { gasCalculator.transactionIntrinsicGasCost(t.getPayload(), t.isContractCreation())) .isEqualTo(expectedGas); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/PragueWithdrawalRequestValidatorTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/PragueWithdrawalRequestValidatorTest.java index 1d53b4b19c..8756f85592 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/PragueWithdrawalRequestValidatorTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/PragueWithdrawalRequestValidatorTest.java @@ -28,6 +28,7 @@ import java.util.List; import java.util.Optional; import java.util.stream.Stream; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -72,4 +73,11 @@ class PragueWithdrawalRequestValidatorTest { Arguments.of(blockWithWithdrawalRequestsMismatch(), false), Arguments.of(blockWithMoreThanMaximumWithdrawalRequests(), false)); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/RefundSstoreGasTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/RefundSstoreGasTest.java index e98bbc528c..77edb8a76f 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/RefundSstoreGasTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/RefundSstoreGasTest.java @@ -16,6 +16,7 @@ package org.hyperledger.besu.ethereum.mainnet; import static org.apache.tuweni.units.bigints.UInt256.ONE; import static org.apache.tuweni.units.bigints.UInt256.ZERO; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; @@ -29,6 +30,7 @@ import java.util.stream.Stream; import org.apache.tuweni.units.bigints.UInt256; import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -134,4 +136,11 @@ public class RefundSstoreGasTest { newValue, mockSupplierCurrentValue, mockSupplierForOriginalValue)) .isEqualTo(expectedGasRefund); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/WithdrawalRequestValidatorTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/WithdrawalRequestValidatorTest.java index 43797a6e0d..f93067d94f 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/WithdrawalRequestValidatorTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/WithdrawalRequestValidatorTest.java @@ -29,6 +29,7 @@ import java.util.List; import java.util.Optional; import java.util.stream.Stream; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -76,4 +77,11 @@ class WithdrawalRequestValidatorTest { Arguments.of(blockWithoutWithdrawalRequestsWithWithdrawalRequestsRoot(), false), Arguments.of(blockWithoutWithdrawalRequestsAndWithdrawalRequestsRoot(), true)); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/GasLimitElasticityValidationRuleFixedBaseFeeMarketTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/GasLimitElasticityValidationRuleFixedBaseFeeMarketTest.java index 7f29e6f42a..94b58fa690 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/GasLimitElasticityValidationRuleFixedBaseFeeMarketTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/GasLimitElasticityValidationRuleFixedBaseFeeMarketTest.java @@ -25,6 +25,7 @@ import org.hyperledger.besu.ethereum.mainnet.feemarket.FixedBaseFeeMarket; import java.util.Optional; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; @@ -72,4 +73,11 @@ public class GasLimitElasticityValidationRuleFixedBaseFeeMarketTest { assertThat(uut.validate(header, parent)).isEqualTo(expectedResult); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/GasLimitElasticityValidationRuleTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/GasLimitElasticityValidationRuleTest.java index bd69303a05..1f74233445 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/GasLimitElasticityValidationRuleTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/GasLimitElasticityValidationRuleTest.java @@ -24,6 +24,7 @@ import org.hyperledger.besu.ethereum.mainnet.feemarket.LondonFeeMarket; import java.util.Optional; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; @@ -69,4 +70,11 @@ public class GasLimitElasticityValidationRuleTest { assertThat(uut.validate(header, parent)).isEqualTo(expectedResult); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/GasLimitElasticityValidationRuleZeroBaseFeeMarketTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/GasLimitElasticityValidationRuleZeroBaseFeeMarketTest.java index 229b402edc..39462a22cd 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/GasLimitElasticityValidationRuleZeroBaseFeeMarketTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/GasLimitElasticityValidationRuleZeroBaseFeeMarketTest.java @@ -24,6 +24,7 @@ import org.hyperledger.besu.ethereum.mainnet.feemarket.ZeroBaseFeeMarket; import java.util.Optional; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.CsvSource; @@ -71,4 +72,11 @@ public class GasLimitElasticityValidationRuleZeroBaseFeeMarketTest { assertThat(uut.validate(header, parent)).isEqualTo(expectedResult); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/GasLimitRangeAndDeltaValidationRuleTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/GasLimitRangeAndDeltaValidationRuleTest.java index 635f8e1c19..665da47354 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/GasLimitRangeAndDeltaValidationRuleTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/GasLimitRangeAndDeltaValidationRuleTest.java @@ -23,6 +23,7 @@ import org.hyperledger.besu.ethereum.core.BlockHeaderTestFixture; import java.util.Optional; import java.util.stream.Stream; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -102,4 +103,11 @@ public class GasLimitRangeAndDeltaValidationRuleTest { assertThat(uut.validate(header, parent)).isEqualTo(expectedResult); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/GasUsageValidationRuleTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/GasUsageValidationRuleTest.java index 06dff08046..a06fa0c700 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/GasUsageValidationRuleTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/GasUsageValidationRuleTest.java @@ -21,6 +21,7 @@ import org.hyperledger.besu.ethereum.core.BlockHeaderTestFixture; import java.util.stream.Stream; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -48,4 +49,11 @@ public class GasUsageValidationRuleTest { assertThat(uut.validate(header, null)).isEqualTo(expectedResult); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/ProofOfWorkValidationRuleTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/ProofOfWorkValidationRuleTest.java index 8d831ab7c4..8f11434d1e 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/ProofOfWorkValidationRuleTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/mainnet/headervalidationrules/ProofOfWorkValidationRuleTest.java @@ -37,6 +37,7 @@ import java.util.Optional; import java.util.stream.Stream; import org.apache.tuweni.units.bigints.UInt256; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -216,4 +217,11 @@ public class ProofOfWorkValidationRuleTest { final ProtocolSchedule protocolSchedule = ProtocolScheduleFixture.MAINNET; return ScheduleBasedBlockHeaderFunctions.create(protocolSchedule); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/util/BlockchainUtilParameterizedTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/util/BlockchainUtilParameterizedTest.java index e4f5780309..af673d10d5 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/util/BlockchainUtilParameterizedTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/util/BlockchainUtilParameterizedTest.java @@ -33,6 +33,7 @@ import java.util.Random; import java.util.stream.Stream; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -131,4 +132,11 @@ public class BlockchainUtilParameterizedTest { assertThat(maybeAncestorNumber.getAsInt()) .isEqualTo(Math.toIntExact(chainHeight - commonHeader.getNumber())); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/ChainHeadTrackerTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/ChainHeadTrackerTest.java index b46a109c12..4bad73ebb6 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/ChainHeadTrackerTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/ChainHeadTrackerTest.java @@ -14,6 +14,7 @@ */ package org.hyperledger.besu.ethereum.eth.sync; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import org.hyperledger.besu.config.GenesisConfigFile; @@ -37,6 +38,7 @@ import org.hyperledger.besu.plugin.services.storage.DataStorageFormat; import java.util.stream.Stream; import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -150,4 +152,11 @@ public class ChainHeadTrackerTest { private ChainState chainHeadState() { return respondingPeer.getEthPeer().chainState(); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/checkpointsync/CheckPointSyncChainDownloaderTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/checkpointsync/CheckPointSyncChainDownloaderTest.java index 09761081a1..c623b553f1 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/checkpointsync/CheckPointSyncChainDownloaderTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/checkpointsync/CheckPointSyncChainDownloaderTest.java @@ -48,6 +48,7 @@ import java.util.concurrent.CompletableFuture; import java.util.stream.Stream; import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -124,8 +125,10 @@ public class CheckPointSyncChainDownloaderTest { } @AfterEach - public void tearDown() { - ethProtocolManager.stop(); + void tearDown() { + if (ethContext != null) { + ethProtocolManager.stop(); + } } private ChainDownloader downloader( @@ -208,4 +211,11 @@ public class CheckPointSyncChainDownloaderTest { assertThat(localBlockchain.getChainHeadHeader()) .isEqualTo(otherBlockchain.getBlockHeader(pivotBlockNumber).get()); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/FastDownloaderFactoryTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/FastDownloaderFactoryTest.java index e100c03698..b5be361bf4 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/FastDownloaderFactoryTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/FastDownloaderFactoryTest.java @@ -48,6 +48,7 @@ import java.util.stream.Stream; import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.params.ParameterizedTest; @@ -254,4 +255,11 @@ public class FastDownloaderFactoryTest { when(fastSyncDir.toFile()).thenReturn(fastSyncDirFile); when(dataDirectory.resolve(anyString())).thenReturn(fastSyncDir); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/FastSyncActionsTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/FastSyncActionsTest.java index d29bb7260e..68caf2182c 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/FastSyncActionsTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/FastSyncActionsTest.java @@ -53,6 +53,7 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Stream; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -539,4 +540,11 @@ public class FastSyncActionsTest { pivotBlockSelector, new NoOpMetricsSystem()); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/FastSyncChainDownloaderTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/FastSyncChainDownloaderTest.java index a731185167..f7a8a9ee54 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/FastSyncChainDownloaderTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/FastSyncChainDownloaderTest.java @@ -44,6 +44,7 @@ import java.util.concurrent.locks.LockSupport; import java.util.stream.Stream; import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -95,7 +96,9 @@ public class FastSyncChainDownloaderTest { @AfterEach public void tearDown() { - ethProtocolManager.stop(); + if (ethProtocolManager != null) { + ethProtocolManager.stop(); + } } private ChainDownloader downloader( @@ -222,4 +225,11 @@ public class FastSyncChainDownloaderTest { assertThat(localBlockchain.getChainHeadHeader()) .isEqualTo(otherBlockchain.getBlockHeader(pivotBlockNumber).get()); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/FastSyncDownloaderTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/FastSyncDownloaderTest.java index ae252a39f4..e929b72ff9 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/FastSyncDownloaderTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/FastSyncDownloaderTest.java @@ -50,6 +50,7 @@ import java.util.function.Supplier; import java.util.stream.Stream; import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -605,4 +606,11 @@ public class FastSyncDownloaderTest { return null; }); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/PivotBlockConfirmerTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/PivotBlockConfirmerTest.java index 050724ef55..2a8a311084 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/PivotBlockConfirmerTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/PivotBlockConfirmerTest.java @@ -42,6 +42,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Stream; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -341,4 +342,11 @@ public class PivotBlockConfirmerTest { return RespondingEthPeer.blockchainResponder(mockBlockchain); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/PivotBlockRetrieverTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/PivotBlockRetrieverTest.java index 41317fdab3..a377ee7827 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/PivotBlockRetrieverTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/PivotBlockRetrieverTest.java @@ -45,6 +45,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Stream; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -425,4 +426,11 @@ public class PivotBlockRetrieverTest { return RespondingEthPeer.blockchainResponder(mockBlockchain); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/worldstate/FastWorldDownloadStateTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/worldstate/FastWorldDownloadStateTest.java index 44847ffb93..a808ac7078 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/worldstate/FastWorldDownloadStateTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fastsync/worldstate/FastWorldDownloadStateTest.java @@ -43,6 +43,7 @@ import java.util.concurrent.ExecutionException; import java.util.stream.Stream; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -265,4 +266,11 @@ public class FastWorldDownloadStateTest { .isInstanceOf(ExecutionException.class) .hasRootCauseInstanceOf(StalledDownloadException.class); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fullsync/FullSyncChainDownloaderTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fullsync/FullSyncChainDownloaderTest.java index f44c8e2da3..ded65f6a12 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fullsync/FullSyncChainDownloaderTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fullsync/FullSyncChainDownloaderTest.java @@ -55,6 +55,7 @@ import java.util.stream.Stream; import org.awaitility.Awaitility; import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -107,7 +108,9 @@ public class FullSyncChainDownloaderTest { @AfterEach public void tearDown() { - ethProtocolManager.stop(); + if (ethProtocolManager != null) { + ethProtocolManager.stop(); + } } private ChainDownloader downloader(final SynchronizerConfiguration syncConfig) { @@ -499,4 +502,11 @@ public class FullSyncChainDownloaderTest { } return shortChain; } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fullsync/FullSyncChainDownloaderTotalTerminalDifficultyTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fullsync/FullSyncChainDownloaderTotalTerminalDifficultyTest.java index c9f22ec5f0..4eeb3bbc63 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fullsync/FullSyncChainDownloaderTotalTerminalDifficultyTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fullsync/FullSyncChainDownloaderTotalTerminalDifficultyTest.java @@ -39,6 +39,7 @@ import java.util.concurrent.CompletableFuture; import java.util.stream.Stream; import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -91,7 +92,9 @@ public class FullSyncChainDownloaderTotalTerminalDifficultyTest { @AfterEach public void tearDown() { - ethProtocolManager.stop(); + if (ethProtocolManager != null) { + ethProtocolManager.stop(); + } } private ChainDownloader downloader( @@ -179,4 +182,11 @@ public class FullSyncChainDownloaderTotalTerminalDifficultyTest { assertThat(future.isDone()).isFalse(); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fullsync/FullSyncDownloaderTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fullsync/FullSyncDownloaderTest.java index cb0f399ff8..a44ddc07bb 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fullsync/FullSyncDownloaderTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fullsync/FullSyncDownloaderTest.java @@ -36,6 +36,7 @@ import org.hyperledger.besu.plugin.services.storage.DataStorageFormat; import java.util.stream.Stream; import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -82,7 +83,9 @@ public class FullSyncDownloaderTest { @AfterEach public void tearDown() { - ethProtocolManager.stop(); + if (ethProtocolManager != null) { + ethProtocolManager.stop(); + } } private FullSyncDownloader downloader(final SynchronizerConfiguration syncConfig) { @@ -129,4 +132,11 @@ public class FullSyncDownloaderTest { assertThat(synchronizer.calculateTrailingPeerRequirements()) .isEqualTo(TrailingPeerRequirements.UNRESTRICTED); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fullsync/FullSyncTargetManagerTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fullsync/FullSyncTargetManagerTest.java index d10be455ea..027bd270d2 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fullsync/FullSyncTargetManagerTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/fullsync/FullSyncTargetManagerTest.java @@ -43,6 +43,7 @@ import java.util.concurrent.CompletableFuture; import java.util.stream.Stream; import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -100,7 +101,9 @@ public class FullSyncTargetManagerTest { @AfterEach public void tearDown() { - ethProtocolManager.stop(); + if (ethProtocolManager != null) { + ethProtocolManager.stop(); + } } @ParameterizedTest @@ -180,4 +183,11 @@ public class FullSyncTargetManagerTest { new SyncTarget(bestPeer.getEthPeer(), localBlockchain.getChainHeadHeader())); assertThat(bestPeer.getPeerConnection().isDisconnected()).isFalse(); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/snapsync/SnapWorldDownloadStateTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/snapsync/SnapWorldDownloadStateTest.java index 28298acb9c..d1e90b5eb6 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/snapsync/SnapWorldDownloadStateTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/snapsync/SnapWorldDownloadStateTest.java @@ -62,6 +62,7 @@ import java.util.stream.Stream; import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes32; import org.junit.jupiter.api.Assumptions; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -493,4 +494,11 @@ public class SnapWorldDownloadStateTest { .isEmpty(); assertThat(downloadState.isDownloading()).isTrue(); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/snapsync/request/heal/StorageTrieNodeHealingRequestTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/snapsync/request/heal/StorageTrieNodeHealingRequestTest.java index f36a64c876..4f8299f9ac 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/snapsync/request/heal/StorageTrieNodeHealingRequestTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/snapsync/request/heal/StorageTrieNodeHealingRequestTest.java @@ -14,6 +14,8 @@ */ package org.hyperledger.besu.ethereum.eth.sync.snapsync.request.heal; +import static org.assertj.core.api.Assertions.assertThat; + import org.hyperledger.besu.datatypes.Address; import org.hyperledger.besu.datatypes.Hash; import org.hyperledger.besu.ethereum.core.InMemoryKeyValueStorageProvider; @@ -36,6 +38,7 @@ import java.util.stream.Stream; import org.apache.tuweni.bytes.Bytes; import org.assertj.core.api.Assertions; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.params.ParameterizedTest; @@ -115,4 +118,11 @@ class StorageTrieNodeHealingRequestTest { Assertions.assertThat(request.getExistingData(worldStateStorageCoordinator)).isEmpty(); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/tasks/DetermineCommonAncestorTaskParameterizedTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/tasks/DetermineCommonAncestorTaskParameterizedTest.java index 71c0bcb544..73d5e5138b 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/tasks/DetermineCommonAncestorTaskParameterizedTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/tasks/DetermineCommonAncestorTaskParameterizedTest.java @@ -51,6 +51,7 @@ import java.util.stream.Stream; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -174,4 +175,11 @@ public class DetermineCommonAncestorTaskParameterizedTest { assertThat(actualResult.get().getHash()) .isEqualTo(MainnetBlockHeaderFunctions.createHash(commonHeader)); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/tasks/PersistBlockTaskTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/tasks/PersistBlockTaskTest.java index d789405763..dd5d79b667 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/tasks/PersistBlockTaskTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/sync/tasks/PersistBlockTaskTest.java @@ -40,6 +40,7 @@ import java.util.concurrent.CompletableFuture; import java.util.stream.Stream; import org.awaitility.Awaitility; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtensionContext; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; @@ -420,4 +421,11 @@ public class PersistBlockTaskTest { assertThat(result.isCancelled()).isTrue(); assertThat(blockchain.contains(nextBlock.getHash())).isFalse(); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionPoolReplacementHandlerTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionPoolReplacementHandlerTest.java index f57d6fac3e..aca1f202c2 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionPoolReplacementHandlerTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionPoolReplacementHandlerTest.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Optional; import java.util.stream.Collectors; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -88,4 +89,11 @@ public class TransactionPoolReplacementHandlerTest { when(pendingTransaction.getTransaction()).thenReturn(transaction); return pendingTransaction; } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionReplacementByFeeMarketRuleTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionReplacementByFeeMarketRuleTest.java index 527b26e251..eb22184a2b 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionReplacementByFeeMarketRuleTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionReplacementByFeeMarketRuleTest.java @@ -24,6 +24,7 @@ import org.hyperledger.besu.util.number.Percentage; import java.util.Collection; import java.util.Optional; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -107,4 +108,11 @@ public class TransactionReplacementByFeeMarketRuleTest extends AbstractTransacti .shouldReplace(oldTx, newTx, baseFee)) .isEqualTo(expected); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionReplacementByGasPriceRuleTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionReplacementByGasPriceRuleTest.java index d4f851e190..651666fdd5 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionReplacementByGasPriceRuleTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionReplacementByGasPriceRuleTest.java @@ -24,6 +24,7 @@ import org.hyperledger.besu.util.number.Percentage; import java.util.Collection; import java.util.Optional; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -84,4 +85,11 @@ public class TransactionReplacementByGasPriceRuleTest extends AbstractTransactio .shouldReplace(oldTx, newTx, baseFee)) .isEqualTo(expected); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionReplacementRulesTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionReplacementRulesTest.java index a6a5524eed..da7b465583 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionReplacementRulesTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionReplacementRulesTest.java @@ -27,6 +27,7 @@ import org.hyperledger.besu.util.number.Percentage; import java.util.Collection; import java.util.Optional; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -106,4 +107,11 @@ public class TransactionReplacementRulesTest extends AbstractTransactionReplacem .shouldReplace(oldTx, newTx, mockHeader)) .isEqualTo(expected); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/layered/LayersTest.java b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/layered/LayersTest.java index 6946111e5c..a56222345c 100644 --- a/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/layered/LayersTest.java +++ b/ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/layered/LayersTest.java @@ -58,6 +58,7 @@ import java.util.Optional; import java.util.OptionalLong; import java.util.stream.Stream; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -1622,4 +1623,11 @@ public class LayersTest extends BaseTransactionPoolTest { this.hasPriority = hasPriority; } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/evmtool/src/test/java/org/hyperledger/besu/evmtool/EvmToolSpecTests.java b/ethereum/evmtool/src/test/java/org/hyperledger/besu/evmtool/EvmToolSpecTests.java index 66efb574fe..24cd858ba7 100644 --- a/ethereum/evmtool/src/test/java/org/hyperledger/besu/evmtool/EvmToolSpecTests.java +++ b/ethereum/evmtool/src/test/java/org/hyperledger/besu/evmtool/EvmToolSpecTests.java @@ -45,6 +45,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectReader; import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.JsonNodeType; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -183,4 +184,11 @@ public class EvmToolSpecTests { assertThat(actualNode).isEqualTo(stdoutNode); } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/evmtool/src/test/resources/org/hyperledger/besu/evmtool/t8n/prague-withdrawal.json b/ethereum/evmtool/src/test/resources/org/hyperledger/besu/evmtool/t8n/prague-withdrawal.json index 66dcf3e85e..cc8958b07c 100644 --- a/ethereum/evmtool/src/test/resources/org/hyperledger/besu/evmtool/t8n/prague-withdrawal.json +++ b/ethereum/evmtool/src/test/resources/org/hyperledger/besu/evmtool/t8n/prague-withdrawal.json @@ -178,6 +178,7 @@ "0x00a3ca265ebcb825b45f985a16cefb49958ce017": { "code": "0x3373fffffffffffffffffffffffffffffffffffffffe146090573615156028575f545f5260205ff35b366038141561012e5760115f54600182026001905f5b5f82111560595781019083028483029004916001019190603e565b90939004341061012e57600154600101600155600354806003026004013381556001015f3581556001016020359055600101600355005b6003546002548082038060101160a4575060105b5f5b81811460dd5780604c02838201600302600401805490600101805490600101549160601b83528260140152906034015260010160a6565b910180921460ed579060025560f8565b90505f6002555f6003555b5f548061049d141561010757505f5b60015460028282011161011c5750505f610122565b01600290035b5f555f600155604c025ff35b5f5ffd", "storage": { + "0x0000000000000000000000000000000000000000000000000000000000000000": "0x000000000000000000000000000000000000000000000000000000000000000e", "0x0000000000000000000000000000000000000000000000000000000000000004": "0x0000000000000000000000000000000000000000000000000000000000000200", "0x0000000000000000000000000000000000000000000000000000000000000006": "0x00000000000000000000000000000001fffffffffffffffe0000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000007": "0x0000000000000000000000000000000000000000000000000000000000000200", @@ -229,31 +230,6 @@ }, "body": "0xf903e5f903e28007830f424094000000000000000000000000000000000000020080b90380000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001fffffffffffffffe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003fffffffffffffffe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005fffffffffffffffe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007fffffffffffffffe0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009fffffffffffffffe00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000bfffffffffffffffe00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000dfffffffffffffffe00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffffe000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000026a0963cb6620fe5828cbc93bb7139d3f4501067d76275dff648bf48c3c100ca8dd4a04ac396104a5be4643406718f59a6e74d62a32777f5f6135e55e805e87612013c", "result": { - "stateRoot": "0xdba3aee0733886dac565d2a654d8fac1953fd913261f44b3aa31f153e159e98a", - "txRoot": "0x8521df63211790726b6f1a437bb0fd4b27c00e13e7678d324c4cfddb8d834ad2", - "receiptsRoot": "0x4bd8bd5580caf4ed45f873794ad7ff9d6fd2363ae529269b17b891b68d349d75", - "logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "receipts": [ - { - "root": "0x", - "status": "0x1", - "cumulativeGasUsed": "0xe52ba", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "logs": null, - "transactionHash": "0x04a2d3f252dcc98edb684f7f15b572aaf980d0c2eea4c620a9f1ff1d275b2207", - "contractAddress": "0x0000000000000000000000000000000000000000", - "gasUsed": "0xe52ba", - "blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "transactionIndex": "0x0" - } - ], - "currentDifficulty": null, - "gasUsed": "0xe52ba", - "currentBaseFee": "0x7", - "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", - "currentExcessBlobGas": "0x0", - "blobGasUsed": "0x0", "requestsRoot": "0x415d33e444f917658fd3bd6d3d8d88a1f501f9b83ace92ddacac823252c9fa47", "depositRequests": [], "withdrawalRequests": [ @@ -337,7 +313,32 @@ "validatorPubkey": "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010", "amount": "0x0000000000000000" } - ] + ], + "stateRoot": "0xf63d7552dc407993393315e99272781d04eedfcf369a1acd3e386d1e6710229d", + "txRoot": "0x8521df63211790726b6f1a437bb0fd4b27c00e13e7678d324c4cfddb8d834ad2", + "receiptsRoot": "0x4bd8bd5580caf4ed45f873794ad7ff9d6fd2363ae529269b17b891b68d349d75", + "logsHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "receipts": [ + { + "root": "0x", + "status": "0x1", + "cumulativeGasUsed": "0xe52ba", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "logs": null, + "transactionHash": "0x04a2d3f252dcc98edb684f7f15b572aaf980d0c2eea4c620a9f1ff1d275b2207", + "contractAddress": "0x0000000000000000000000000000000000000000", + "gasUsed": "0xe52ba", + "blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", + "transactionIndex": "0x0" + } + ], + "currentDifficulty": null, + "gasUsed": "0xe52ba", + "currentBaseFee": "0x7", + "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "currentExcessBlobGas": "0x0", + "blobGasUsed": "0x0" } } } \ No newline at end of file diff --git a/ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/discovery/internal/PeerRequirementCombineTest.java b/ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/discovery/internal/PeerRequirementCombineTest.java index 5c7a140dc6..7ad7f7c415 100644 --- a/ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/discovery/internal/PeerRequirementCombineTest.java +++ b/ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/discovery/internal/PeerRequirementCombineTest.java @@ -23,6 +23,7 @@ import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; import java.util.stream.Stream; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -76,4 +77,11 @@ public class PeerRequirementCombineTest { PeerRequirement combined = PeerRequirement.combine(Collections.emptyList()); assertThat(combined.hasSufficientPeers()).isTrue(); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/peers/EnodeURLImplTest.java b/ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/peers/EnodeURLImplTest.java index b7cc2a0632..cf8fdd6cf0 100644 --- a/ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/peers/EnodeURLImplTest.java +++ b/ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/peers/EnodeURLImplTest.java @@ -32,6 +32,8 @@ import java.util.stream.Stream; import org.apache.tuweni.bytes.Bytes; import org.assertj.core.api.ThrowableAssert; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledOnOs; +import org.junit.jupiter.api.condition.OS; import org.mockito.Mockito; public class EnodeURLImplTest { @@ -494,6 +496,9 @@ public class EnodeURLImplTest { } @Test + @DisabledOnOs( + value = OS.MAC, + disabledReason = "canonical lookup may not match dns lookup for local machine") public void toURI_WithHostnameShouldWorkWhenDnsEnabledAndUpdateEnabled() throws UnknownHostException { final String enodeURLString = diff --git a/ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/rlpx/connections/netty/TLSContextFactoryTest.java b/ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/rlpx/connections/netty/TLSContextFactoryTest.java index 45d228cb40..d7763892c5 100644 --- a/ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/rlpx/connections/netty/TLSContextFactoryTest.java +++ b/ethereum/p2p/src/test/java/org/hyperledger/besu/ethereum/p2p/rlpx/connections/netty/TLSContextFactoryTest.java @@ -48,6 +48,7 @@ import io.netty.handler.ssl.SslContext; import io.netty.handler.ssl.SslHandler; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.DisabledOnOs; import org.junit.jupiter.api.condition.OS; import org.junit.jupiter.params.ParameterizedTest; @@ -493,4 +494,11 @@ class TLSContextFactoryTest { return messageHandler != null ? messageHandler.getCause() : Optional.empty(); } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/code/EOFLayoutTest.java b/evm/src/test/java/org/hyperledger/besu/evm/code/EOFLayoutTest.java index 5324d7adf0..145adfb2dd 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/code/EOFLayoutTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/code/EOFLayoutTest.java @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.Collection; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -361,4 +362,11 @@ public class EOFLayoutTest { assertThat(layout.getCodeSectionCount()).isNotZero(); } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/gascalculator/CancunGasCalculatorTest.java b/evm/src/test/java/org/hyperledger/besu/evm/gascalculator/CancunGasCalculatorTest.java index 917b95b688..ded199bf3b 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/gascalculator/CancunGasCalculatorTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/gascalculator/CancunGasCalculatorTest.java @@ -18,6 +18,7 @@ import static org.assertj.core.api.Assertions.assertThat; import java.util.List; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -43,4 +44,11 @@ public class CancunGasCalculatorTest { Arguments.of(targetGasPerBlock, 1, CancunGasCalculator.BLOB_GAS_PER_BLOB), Arguments.of(targetGasPerBlock, 3, targetGasPerBlock)); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/internal/WordsTest.java b/evm/src/test/java/org/hyperledger/besu/evm/internal/WordsTest.java index 30e651436d..871f6ed0b1 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/internal/WordsTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/internal/WordsTest.java @@ -22,6 +22,7 @@ import java.util.Arrays; import java.util.Collection; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; import org.junit.jupiter.api.TestInstance.Lifecycle; import org.junit.jupiter.params.ParameterizedTest; @@ -103,4 +104,11 @@ class WordsTest { void clampedToIntTest(final Bytes theBytes, final int theExpectedInt) { assertThat(clampedToInt(theBytes)).isEqualTo(theExpectedInt); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/operations/ChainIdOperationTest.java b/evm/src/test/java/org/hyperledger/besu/evm/operations/ChainIdOperationTest.java index e8d2c3d02d..969039266d 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/operations/ChainIdOperationTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/operations/ChainIdOperationTest.java @@ -27,6 +27,7 @@ import java.util.List; import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes32; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -67,4 +68,11 @@ class ChainIdOperationTest { final OperationResult result = operation.execute(messageFrame, null); assertThat(result.getGasCost()).isEqualTo(expectedGas); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/operations/ConstantinopleSStoreOperationGasCostTest.java b/evm/src/test/java/org/hyperledger/besu/evm/operations/ConstantinopleSStoreOperationGasCostTest.java index 00edb9c5d1..3cea9300e1 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/operations/ConstantinopleSStoreOperationGasCostTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/operations/ConstantinopleSStoreOperationGasCostTest.java @@ -23,6 +23,7 @@ import org.hyperledger.besu.evm.internal.EvmConfiguration; import org.hyperledger.besu.evm.testutils.TestCodeExecutor; import org.apache.tuweni.units.bigints.UInt256; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -73,4 +74,11 @@ public class ConstantinopleSStoreOperationGasCostTest { assertThat(frame.getRemainingGas()).isEqualTo(gasLimit - expectedGasUsed); assertThat(frame.getGasRefund()).isEqualTo(expectedGasRefund); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/operations/LondonSStoreOperationGasCostTest.java b/evm/src/test/java/org/hyperledger/besu/evm/operations/LondonSStoreOperationGasCostTest.java index 1065d5cbd6..f2cf950683 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/operations/LondonSStoreOperationGasCostTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/operations/LondonSStoreOperationGasCostTest.java @@ -24,6 +24,7 @@ import org.hyperledger.besu.evm.testutils.TestCodeExecutor; import org.apache.tuweni.units.bigints.UInt256; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -76,4 +77,11 @@ public class LondonSStoreOperationGasCostTest { assertThat(frame.getRemainingGas()).isEqualTo(gasLimit - (expectedGasUsed + 2100)); assertThat(frame.getGasRefund()).isEqualTo(expectedGasRefund); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/operations/MCopyOperationTest.java b/evm/src/test/java/org/hyperledger/besu/evm/operations/MCopyOperationTest.java index a30375723a..2975312920 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/operations/MCopyOperationTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/operations/MCopyOperationTest.java @@ -27,6 +27,7 @@ import java.util.Arrays; import java.util.Collection; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -134,4 +135,11 @@ class MCopyOperationTest { assertThat(frame.readMemory(0, expected.size())).isEqualTo(expected); assertThat(result.getGasCost()).isEqualTo(gasCost); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/operations/SStoreOperationTest.java b/evm/src/test/java/org/hyperledger/besu/evm/operations/SStoreOperationTest.java index e2f14dbdb2..3993d9f81e 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/operations/SStoreOperationTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/operations/SStoreOperationTest.java @@ -34,6 +34,7 @@ import org.hyperledger.besu.evm.worldstate.WorldUpdater; import java.util.List; import org.apache.tuweni.units.bigints.UInt256; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -88,4 +89,11 @@ class SStoreOperationTest { final OperationResult result = operation.execute(frame, null); assertThat(result.getHaltReason()).isEqualTo(expectedHalt); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/operations/SarOperationTest.java b/evm/src/test/java/org/hyperledger/besu/evm/operations/SarOperationTest.java index 460a7294f6..86182e47e3 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/operations/SarOperationTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/operations/SarOperationTest.java @@ -14,6 +14,7 @@ */ package org.hyperledger.besu.evm.operations; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -27,6 +28,7 @@ import java.util.List; import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes32; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -176,4 +178,11 @@ class SarOperationTest { operation.execute(frame, null); verify(frame).pushStackItem(Bytes.fromHexString(expectedResult)); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/operations/SelfDestructOperationTest.java b/evm/src/test/java/org/hyperledger/besu/evm/operations/SelfDestructOperationTest.java index 3b372f03a0..7842174e90 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/operations/SelfDestructOperationTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/operations/SelfDestructOperationTest.java @@ -36,6 +36,7 @@ import org.hyperledger.besu.evm.operation.SelfDestructOperation; import org.hyperledger.besu.evm.worldstate.WorldUpdater; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -176,4 +177,11 @@ public class SelfDestructOperationTest { assertThat(messageFrame.getCreates()).doesNotContain(orignatorAddress); } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/operations/ShlOperationTest.java b/evm/src/test/java/org/hyperledger/besu/evm/operations/ShlOperationTest.java index 7ee283877a..b567cb6302 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/operations/ShlOperationTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/operations/ShlOperationTest.java @@ -14,6 +14,7 @@ */ package org.hyperledger.besu.evm.operations; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -28,6 +29,7 @@ import java.util.Arrays; import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes32; import org.apache.tuweni.units.bigints.UInt256; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -113,4 +115,11 @@ class ShlOperationTest { operation.execute(frame, null); verify(frame).pushStackItem(Bytes.fromHexString(expectedResult)); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/operations/ShrOperationTest.java b/evm/src/test/java/org/hyperledger/besu/evm/operations/ShrOperationTest.java index 16e5ca7631..659c50d35c 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/operations/ShrOperationTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/operations/ShrOperationTest.java @@ -14,6 +14,7 @@ */ package org.hyperledger.besu.evm.operations; +import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -28,6 +29,7 @@ import java.util.Arrays; import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes32; import org.apache.tuweni.units.bigints.UInt256; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -124,4 +126,11 @@ class ShrOperationTest { operation.execute(frame, null); verify(frame).pushStackItem(Bytes.fromHexString(expectedResult)); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLAKE2BFPrecompileContractTest.java b/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLAKE2BFPrecompileContractTest.java index c449f3e082..381e64c015 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLAKE2BFPrecompileContractTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLAKE2BFPrecompileContractTest.java @@ -21,6 +21,7 @@ import org.hyperledger.besu.evm.frame.MessageFrame; import org.hyperledger.besu.evm.gascalculator.PetersburgGasCalculator; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -76,4 +77,11 @@ class BLAKE2BFPrecompileContractTest { .isEqualTo(expectedComputation); assertThat(contract.gasRequirement(input)).isEqualTo(expectedGasUsed); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G1AddPrecompiledContractTest.java b/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G1AddPrecompiledContractTest.java index c85f26b12d..2ad792a410 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G1AddPrecompiledContractTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G1AddPrecompiledContractTest.java @@ -27,6 +27,7 @@ import java.util.stream.Collectors; import com.google.common.io.CharStreams; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -79,4 +80,11 @@ class BLS12G1AddPrecompiledContractTest { assertThat(contract.gasRequirement(input)).isEqualTo(Long.parseLong(expectedGasUsed)); } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G1MulPrecompiledContractTest.java b/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G1MulPrecompiledContractTest.java index cfadb57bd3..bf0f8a1481 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G1MulPrecompiledContractTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G1MulPrecompiledContractTest.java @@ -28,6 +28,7 @@ import java.util.stream.Collectors; import com.google.common.io.CharStreams; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -79,4 +80,11 @@ class BLS12G1MulPrecompiledContractTest { assertThat(contract.gasRequirement(input)).isEqualTo(Long.parseLong(expectedGasUsed)); } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G1MultiExpPrecompiledContractTest.java b/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G1MultiExpPrecompiledContractTest.java index 9bd4b6a542..27d45b1dd2 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G1MultiExpPrecompiledContractTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G1MultiExpPrecompiledContractTest.java @@ -28,6 +28,7 @@ import java.util.stream.Collectors; import com.google.common.io.CharStreams; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -80,4 +81,11 @@ class BLS12G1MultiExpPrecompiledContractTest { assertThat(contract.gasRequirement(input)).isEqualTo(Long.parseLong(expectedGasUsed)); } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G2AddPrecompiledContractTest.java b/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G2AddPrecompiledContractTest.java index 18dcd7ea5b..e98422f785 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G2AddPrecompiledContractTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G2AddPrecompiledContractTest.java @@ -28,6 +28,7 @@ import java.util.stream.Collectors; import com.google.common.io.CharStreams; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -79,4 +80,11 @@ class BLS12G2AddPrecompiledContractTest { assertThat(contract.gasRequirement(input)).isEqualTo(Long.parseLong(expectedGasUsed)); } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G2MulPrecompiledContractTest.java b/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G2MulPrecompiledContractTest.java index 0dd510273e..32af467747 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G2MulPrecompiledContractTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G2MulPrecompiledContractTest.java @@ -28,6 +28,7 @@ import java.util.stream.Collectors; import com.google.common.io.CharStreams; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -79,4 +80,11 @@ class BLS12G2MulPrecompiledContractTest { assertThat(contract.gasRequirement(input)).isEqualTo(Long.parseLong(expectedGasUsed)); } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G2MultiExpPrecompiledContractTest.java b/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G2MultiExpPrecompiledContractTest.java index b613bebe80..27ca15076a 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G2MultiExpPrecompiledContractTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12G2MultiExpPrecompiledContractTest.java @@ -27,6 +27,7 @@ import java.util.Objects; import com.google.common.io.CharStreams; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -79,4 +80,11 @@ class BLS12G2MultiExpPrecompiledContractTest { assertThat(contract.gasRequirement(input)).isEqualTo(Long.parseLong(expectedGasUsed)); } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12MapFp2ToG2PrecompiledContractTest.java b/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12MapFp2ToG2PrecompiledContractTest.java index 05f6b4bfb5..afe2826aec 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12MapFp2ToG2PrecompiledContractTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12MapFp2ToG2PrecompiledContractTest.java @@ -28,6 +28,7 @@ import java.util.stream.Collectors; import com.google.common.io.CharStreams; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -80,4 +81,11 @@ class BLS12MapFp2ToG2PrecompiledContractTest { assertThat(contract.gasRequirement(input)).isEqualTo(Long.parseLong(expectedGasUsed)); } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12MapFpToG1PrecompiledContractTest.java b/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12MapFpToG1PrecompiledContractTest.java index cf83346576..836e295dd5 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12MapFpToG1PrecompiledContractTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12MapFpToG1PrecompiledContractTest.java @@ -28,6 +28,7 @@ import java.util.stream.Collectors; import com.google.common.io.CharStreams; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -80,4 +81,11 @@ class BLS12MapFpToG1PrecompiledContractTest { assertThat(contract.gasRequirement(input)).isEqualTo(Long.parseLong(expectedGasUsed)); } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12PairingPrecompiledContractTest.java b/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12PairingPrecompiledContractTest.java index e5d219dcda..134bc12741 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12PairingPrecompiledContractTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/precompile/BLS12PairingPrecompiledContractTest.java @@ -29,6 +29,7 @@ import java.util.stream.Collectors; import com.google.common.collect.Streams; import com.google.common.io.CharStreams; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -89,4 +90,11 @@ class BLS12PairingPrecompiledContractTest { assertThat(contract.gasRequirement(input)).isEqualTo(Long.parseLong(expectedGasUsed)); } } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/precompile/ECRECPrecompiledContractTest.java b/evm/src/test/java/org/hyperledger/besu/evm/precompile/ECRECPrecompiledContractTest.java index bc4026ae64..ac248b947b 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/precompile/ECRECPrecompiledContractTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/precompile/ECRECPrecompiledContractTest.java @@ -22,6 +22,7 @@ import org.hyperledger.besu.evm.gascalculator.SpuriousDragonGasCalculator; import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes32; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -355,4 +356,11 @@ class ECRECPrecompiledContractTest { expectedResult == null ? Bytes.EMPTY : Bytes32.fromHexString(expectedResult); assertThat(contract.computePrecompile(input, messageFrame).getOutput()).isEqualTo(expected); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/precompile/KZGPointEvalPrecompileContractTest.java b/evm/src/test/java/org/hyperledger/besu/evm/precompile/KZGPointEvalPrecompileContractTest.java index fb7ce9d397..bbf9b545af 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/precompile/KZGPointEvalPrecompileContractTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/precompile/KZGPointEvalPrecompileContractTest.java @@ -35,6 +35,7 @@ import org.apache.tuweni.bytes.Bytes; import org.apache.tuweni.bytes.Bytes32; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; @@ -91,4 +92,11 @@ public class KZGPointEvalPrecompileContractTest { record PrecompileTestParameters( Bytes input, boolean valid, Bytes returnValue, VersionedHash versionedHash) {} + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } } diff --git a/evm/src/test/java/org/hyperledger/besu/evm/precompile/MODEXPPrecompiledContractTest.java b/evm/src/test/java/org/hyperledger/besu/evm/precompile/MODEXPPrecompiledContractTest.java index ad2c80a41f..ac4fd9041a 100644 --- a/evm/src/test/java/org/hyperledger/besu/evm/precompile/MODEXPPrecompiledContractTest.java +++ b/evm/src/test/java/org/hyperledger/besu/evm/precompile/MODEXPPrecompiledContractTest.java @@ -22,6 +22,7 @@ import org.hyperledger.besu.evm.gascalculator.BerlinGasCalculator; import org.hyperledger.besu.evm.gascalculator.ByzantiumGasCalculator; import org.apache.tuweni.bytes.Bytes; +import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -181,4 +182,11 @@ class MODEXPPrecompiledContractTest { assertThat(byzantiumContract.gasRequirement(input)).isEqualTo(eip198Gas); assertThat(berlinContract.gasRequirement(input)).isEqualTo(eip2565Gas); } + + @Test + void dryRunDetector() { + assertThat(true) + .withFailMessage("This test is here so gradle --dry-run executes this class") + .isTrue(); + } }