[MINOR] junit5 for RPC ATs (#5208)

Updated to junit 5 for non-parameterized tests

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
pull/5231/head
Sally MacFarlane 2 years ago committed by GitHub
parent 57df469e0e
commit 147e94a6d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/DeploySmartContractAcceptanceTest.java
  2. 6
      acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/DeployTransactionAcceptanceTest.java
  3. 10
      acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthGetWorkAcceptanceTest.java
  4. 6
      acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthSendRawTransactionTest.java
  5. 6
      acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EventEmitterAcceptanceTest.java
  6. 6
      acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/JsonRpcHttpAuthenticationAcceptanceTest.java
  7. 6
      acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/JsonRpcWebsocketAuthenticationAcceptanceTest.java
  8. 10
      acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/NetServicesAcceptanceTest.java
  9. 6
      acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/RevertReasonAcceptanceTest.java
  10. 6
      acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/Web3Sha3AcceptanceTest.java
  11. 10
      acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/admin/AdminAddPeerAcceptanceTest.java

@ -18,14 +18,14 @@ import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase;
import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode;
import org.hyperledger.besu.tests.web3j.generated.SimpleStorage;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class DeploySmartContractAcceptanceTest extends AcceptanceTestBase {
private BesuNode minerNode;
@Before
@BeforeEach
public void setUp() throws Exception {
minerNode = besu.createMinerNode("miner-node");
cluster.start(minerNode);

@ -19,15 +19,15 @@ import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase;
import org.hyperledger.besu.tests.acceptance.dsl.account.Account;
import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class DeployTransactionAcceptanceTest extends AcceptanceTestBase {
private BesuNode minerNode;
private Account recipient;
@Before
@BeforeEach
public void setUp() throws Exception {
recipient = accounts.createAccount("recipient");
minerNode = besu.createMinerNode("node");

@ -17,16 +17,16 @@ package org.hyperledger.besu.tests.acceptance.jsonrpc;
import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase;
import org.hyperledger.besu.tests.acceptance.dsl.node.Node;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
public class EthGetWorkAcceptanceTest extends AcceptanceTestBase {
private Node minerNode;
private Node fullNode;
@Before
@BeforeEach
public void setUp() throws Exception {
minerNode = besu.createMinerNode("node1");
fullNode = besu.createArchiveNode("node2");
@ -34,7 +34,7 @@ public class EthGetWorkAcceptanceTest extends AcceptanceTestBase {
}
@Test
@Ignore("Genuinely Flakey")
@Disabled("Genuinely Flakey")
public void shouldReturnSuccessResponseWhenMining() {
minerNode.verify(eth.getWork());
}

@ -24,8 +24,8 @@ import org.hyperledger.besu.tests.acceptance.dsl.transaction.account.TransferTra
import java.math.BigInteger;
import java.util.function.UnaryOperator;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class EthSendRawTransactionTest extends AcceptanceTestBase {
private static final long CHAIN_ID = 20211;
@ -36,7 +36,7 @@ public class EthSendRawTransactionTest extends AcceptanceTestBase {
private Node strictNode;
private Node miningNode;
@Before
@BeforeEach
public void setUp() throws Exception {
sender = accounts.getPrimaryBenefactor();

@ -26,8 +26,8 @@ import java.util.concurrent.atomic.AtomicBoolean;
import io.reactivex.Flowable;
import io.reactivex.disposables.Disposable;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.web3j.protocol.core.methods.request.EthFilter;
import org.web3j.protocol.core.methods.response.TransactionReceipt;
@ -38,7 +38,7 @@ public class EventEmitterAcceptanceTest extends AcceptanceTestBase {
private BesuNode node;
@Before
@BeforeEach
public void setUp() throws Exception {
node = besu.createMinerNode("node1");
cluster.start(node);

@ -25,8 +25,8 @@ import java.net.URISyntaxException;
import java.util.Arrays;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class JsonRpcHttpAuthenticationAcceptanceTest extends AcceptanceTestBase {
private Cluster authenticatedCluster;
@ -52,7 +52,7 @@ public class JsonRpcHttpAuthenticationAcceptanceTest extends AcceptanceTestBase
private static final List<String> NO_AUTH_API_METHODS = Arrays.asList("net_services");
@Before
@BeforeEach
public void setUp() throws IOException, URISyntaxException {
final ClusterConfiguration clusterConfiguration =

@ -25,8 +25,8 @@ import java.net.URISyntaxException;
import java.util.Arrays;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class JsonRpcWebsocketAuthenticationAcceptanceTest extends AcceptanceTestBase {
private BesuNode nodeUsingAuthFile;
@ -52,7 +52,7 @@ public class JsonRpcWebsocketAuthenticationAcceptanceTest extends AcceptanceTest
+ "c2lvbnMiOlsibmV0OnBlZXJDb3VudCJdfQ.pWXniN6XQ7G8b1nawy8sviPCMxrfbcI6c7UFzeXm26CMGMUEZxiC"
+ "JjRntB8ueuZcsxnGlEhCHt-KngpFEmx5TA";
@Before
@BeforeEach
public void setUp() throws IOException, URISyntaxException {
final ClusterConfiguration clusterConfiguration =
new ClusterConfigurationBuilder().awaitPeerDiscovery(false).build();

@ -20,9 +20,9 @@ import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.Cluster;
import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.ClusterConfiguration;
import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.ClusterConfigurationBuilder;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class NetServicesAcceptanceTest extends AcceptanceTestBase {
@ -31,7 +31,7 @@ public class NetServicesAcceptanceTest extends AcceptanceTestBase {
private Node nodeA;
private Node nodeB;
@Before
@BeforeEach
public void setup() {
final ClusterConfiguration clusterConfiguration =
new ClusterConfigurationBuilder().awaitPeerDiscovery(false).build();
@ -58,7 +58,7 @@ public class NetServicesAcceptanceTest extends AcceptanceTestBase {
nodeB.verify(net.netServicesOnlyJsonRpcEnabled());
}
@After
@AfterEach
public void closeDown() throws Exception {
noDiscoveryCluster.close();
}

@ -21,15 +21,15 @@ import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase;
import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode;
import org.hyperledger.besu.tests.web3j.generated.RevertReason;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.web3j.protocol.core.methods.response.EthSendTransaction;
public class RevertReasonAcceptanceTest extends AcceptanceTestBase {
private BesuNode minerNode;
@Before
@BeforeEach
public void setUp() throws Exception {
minerNode = besu.createMinerNodeWithRevertReasonEnabled("miner-node-withRevertReason");
cluster.start(minerNode);

@ -17,14 +17,14 @@ package org.hyperledger.besu.tests.acceptance.jsonrpc;
import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase;
import org.hyperledger.besu.tests.acceptance.dsl.node.Node;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class Web3Sha3AcceptanceTest extends AcceptanceTestBase {
private Node node;
@Before
@BeforeEach
public void setUp() throws Exception {
node = besu.createArchiveNode("node1");
cluster.start(node);

@ -20,9 +20,9 @@ import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.Cluster;
import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.ClusterConfiguration;
import org.hyperledger.besu.tests.acceptance.dsl.node.cluster.ClusterConfigurationBuilder;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
public class AdminAddPeerAcceptanceTest extends AcceptanceTestBase {
private Cluster noDiscoveryCluster;
@ -30,7 +30,7 @@ public class AdminAddPeerAcceptanceTest extends AcceptanceTestBase {
private Node nodeA;
private Node nodeB;
@Before
@BeforeEach
public void setUp() throws Exception {
final ClusterConfiguration clusterConfiguration =
new ClusterConfigurationBuilder().awaitPeerDiscovery(false).build();
@ -40,7 +40,7 @@ public class AdminAddPeerAcceptanceTest extends AcceptanceTestBase {
noDiscoveryCluster.start(nodeA, nodeB);
}
@After
@AfterEach
public void tearDown() {
noDiscoveryCluster.stop();
}

Loading…
Cancel
Save