From 0ae323e76892631773fd132af1c037e04a1bb8d7 Mon Sep 17 00:00:00 2001 From: Sally MacFarlane Date: Mon, 11 Dec 2023 12:58:40 +1000 Subject: [PATCH] junit 5 (#6256) Signed-off-by: Sally MacFarlane Signed-off-by: jflo --- acceptance-tests/test-plugins/build.gradle | 1 - .../services/BesuPluginContextImplTest.java | 10 +++---- .../jsonrpc/AbstractJsonRpcTest.java | 28 +++++++++---------- .../DebugReplayBlockAcceptanceTest.java | 23 +++++++-------- .../jsonrpc/DebugSetHeadAcceptanceTest.java | 23 +++++++-------- .../jsonrpc/EthEstimateGasAcceptanceTest.java | 6 ++-- ...ByNumberAndHashShanghaiAcceptanceTest.java | 24 +++++++--------- ...gineCancunBlockBuildingAcceptanceTest.java | 24 +++++++--------- .../ExecutionEngineEip6110AcceptanceTest.java | 23 +++++++-------- .../ExecutionEngineParisAcceptanceTest.java | 23 +++++++-------- ...ExecutionEngineShanghaiAcceptanceTest.java | 24 +++++++--------- .../ipc/Web3JSupportAcceptanceTest.java | 6 ++-- 12 files changed, 94 insertions(+), 121 deletions(-) diff --git a/acceptance-tests/test-plugins/build.gradle b/acceptance-tests/test-plugins/build.gradle index f9e960b4944..c31175cee8f 100644 --- a/acceptance-tests/test-plugins/build.gradle +++ b/acceptance-tests/test-plugins/build.gradle @@ -11,7 +11,6 @@ dependencies { implementation 'com.google.auto.service:auto-service' implementation 'info.picocli:picocli' - testImplementation 'junit:junit' testImplementation 'org.assertj:assertj-core' testImplementation 'org.junit.jupiter:junit-jupiter' diff --git a/acceptance-tests/test-plugins/src/test/java/org/hyperledger/besu/services/BesuPluginContextImplTest.java b/acceptance-tests/test-plugins/src/test/java/org/hyperledger/besu/services/BesuPluginContextImplTest.java index 5fd73b66b8f..57797462739 100644 --- a/acceptance-tests/test-plugins/src/test/java/org/hyperledger/besu/services/BesuPluginContextImplTest.java +++ b/acceptance-tests/test-plugins/src/test/java/org/hyperledger/besu/services/BesuPluginContextImplTest.java @@ -29,13 +29,13 @@ import org.assertj.core.api.Assertions; import org.assertj.core.api.ThrowableAssert; -import org.junit.After; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; public class BesuPluginContextImplTest { - @BeforeClass + @BeforeAll public static void createFakePluginDir() throws IOException { if (System.getProperty("besu.plugins.dir") == null) { final Path pluginDir = Files.createTempDirectory("besuTest"); @@ -44,7 +44,7 @@ public static void createFakePluginDir() throws IOException { } } - @After + @AfterEach public void clearTestPluginState() { System.clearProperty("testPicoCLIPlugin.testOption"); } diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/AbstractJsonRpcTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/AbstractJsonRpcTest.java index 508fb891c0e..86b037c1578 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/AbstractJsonRpcTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/AbstractJsonRpcTest.java @@ -30,7 +30,7 @@ import java.net.URISyntaxException; import java.net.URL; import java.util.Arrays; -import java.util.stream.Collectors; +import java.util.stream.Stream; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; @@ -40,10 +40,12 @@ import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; -import org.junit.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; abstract class AbstractJsonRpcTest { - private static final MediaType MEDIA_TYPE_JSON = + protected static final MediaType MEDIA_TYPE_JSON = MediaType.parse("application/json; charset=utf-8"); static class JsonRpcTestsContext { @@ -69,16 +71,14 @@ public void tearDown() { } private final JsonRpcTestsContext testsContext; - private final URI testCaseFileURI; - public AbstractJsonRpcTest( - final String ignored, final JsonRpcTestsContext testsContext, final URI testCaseFileURI) { - this.testCaseFileURI = testCaseFileURI; + public AbstractJsonRpcTest(final JsonRpcTestsContext testsContext) { this.testsContext = testsContext; } - @Test - public void test() throws IOException { + @ParameterizedTest(name = "{index}: {0}") + @MethodSource("testCases") + public void test(final URI testCaseFileURI) throws IOException { final JsonRpcTestCase testCase = testsContext.mapper.readValue(testCaseFileURI.toURL(), JsonRpcTestCase.class); @@ -118,7 +118,7 @@ protected void evaluateResponse( final JsonRpcTestCase testCase, final URL url) {} - private String getRpcUrl(final String rpcMethod) { + protected String getRpcUrl(final String rpcMethod) { if (rpcMethod.contains("eth_") || rpcMethod.contains("engine_")) { return testsContext.besuNode.engineRpcUrl().get(); } @@ -126,14 +126,12 @@ private String getRpcUrl(final String rpcMethod) { return testsContext.besuNode.jsonRpcBaseUrl().get(); } - public static Iterable testCases(final String testCasesPath) throws URISyntaxException { + public static Stream testCasesFromPath(final String testCasesPath) + throws URISyntaxException { final File[] testCasesList = new File(AbstractJsonRpcTest.class.getResource(testCasesPath).toURI()).listFiles(); - return Arrays.stream(testCasesList) - .sorted() - .map(file -> new Object[] {file.getName(), file.toURI()}) - .collect(Collectors.toList()); + return Arrays.stream(testCasesList).sorted().map(File::toURI).map(Arguments::of); } } diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/DebugReplayBlockAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/DebugReplayBlockAcceptanceTest.java index 0b6f76f4de2..aa8547d83bb 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/DebugReplayBlockAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/DebugReplayBlockAcceptanceTest.java @@ -15,36 +15,33 @@ package org.hyperledger.besu.tests.acceptance.jsonrpc; import java.io.IOException; -import java.net.URI; import java.net.URISyntaxException; +import java.util.stream.Stream; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.params.provider.Arguments; -@RunWith(Parameterized.class) public class DebugReplayBlockAcceptanceTest extends AbstractJsonRpcTest { private static final String GENESIS_FILE = "/jsonrpc/debug/replayBlock/genesis.json"; private static final String TEST_CASE_PATH = "/jsonrpc/debug/replayBlock/test-cases/"; private static AbstractJsonRpcTest.JsonRpcTestsContext testsContext; - public DebugReplayBlockAcceptanceTest(final String ignored, final URI testCaseFileURI) { - super(ignored, testsContext, testCaseFileURI); + public DebugReplayBlockAcceptanceTest() { + super(testsContext); } - @BeforeClass + @BeforeAll public static void init() throws IOException { testsContext = new JsonRpcTestsContext(GENESIS_FILE); } - @Parameterized.Parameters(name = "{0}") - public static Iterable testCases() throws URISyntaxException { - return testCases(TEST_CASE_PATH); + public static Stream testCases() throws URISyntaxException { + return testCasesFromPath(TEST_CASE_PATH); } - @AfterClass + @AfterAll public static void tearDown() { testsContext.cluster.close(); } diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/DebugSetHeadAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/DebugSetHeadAcceptanceTest.java index b4db91a39aa..4a2b956efcd 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/DebugSetHeadAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/DebugSetHeadAcceptanceTest.java @@ -15,36 +15,33 @@ package org.hyperledger.besu.tests.acceptance.jsonrpc; import java.io.IOException; -import java.net.URI; import java.net.URISyntaxException; +import java.util.stream.Stream; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.params.provider.Arguments; -@RunWith(Parameterized.class) public class DebugSetHeadAcceptanceTest extends AbstractJsonRpcTest { private static final String GENESIS_FILE = "/jsonrpc/debug/setHead/genesis.json"; private static final String TEST_CASE_PATH = "/jsonrpc/debug/setHead/test-cases/"; private static JsonRpcTestsContext testsContext; - public DebugSetHeadAcceptanceTest(final String ignored, final URI testCaseFileURI) { - super(ignored, testsContext, testCaseFileURI); + public DebugSetHeadAcceptanceTest() { + super(testsContext); } - @BeforeClass + @BeforeAll public static void init() throws IOException { testsContext = new JsonRpcTestsContext(GENESIS_FILE); } - @Parameterized.Parameters(name = "{0}") - public static Iterable testCases() throws URISyntaxException { - return testCases(TEST_CASE_PATH); + public static Stream testCases() throws URISyntaxException { + return testCasesFromPath(TEST_CASE_PATH); } - @AfterClass + @AfterAll public static void tearDown() { testsContext.cluster.close(); } diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthEstimateGasAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthEstimateGasAcceptanceTest.java index b8b4e2e45f4..5326c5763cb 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthEstimateGasAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthEstimateGasAcceptanceTest.java @@ -28,8 +28,8 @@ import java.util.ArrayList; 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 EthEstimateGasAcceptanceTest extends AcceptanceTestBase { @@ -38,7 +38,7 @@ public class EthEstimateGasAcceptanceTest extends AcceptanceTestBase { List> testCase = new ArrayList<>(); - @Before + @BeforeEach public void setUp() throws Exception { node = besu.createMinerNode( diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthGetBlockByNumberAndHashShanghaiAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthGetBlockByNumberAndHashShanghaiAcceptanceTest.java index f50e6c4a3bf..e795ee27abc 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthGetBlockByNumberAndHashShanghaiAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/EthGetBlockByNumberAndHashShanghaiAcceptanceTest.java @@ -15,15 +15,13 @@ package org.hyperledger.besu.tests.acceptance.jsonrpc; import java.io.IOException; -import java.net.URI; import java.net.URISyntaxException; +import java.util.stream.Stream; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.params.provider.Arguments; -@RunWith(Parameterized.class) public class EthGetBlockByNumberAndHashShanghaiAcceptanceTest extends AbstractJsonRpcTest { private static final String TEST_RESOURCES_DIR = "/jsonrpc/eth/getBlockBy/"; private static final String GENESIS_FILE = TEST_RESOURCES_DIR + "genesis.json"; @@ -31,22 +29,20 @@ public class EthGetBlockByNumberAndHashShanghaiAcceptanceTest extends AbstractJs private static AbstractJsonRpcTest.JsonRpcTestsContext testsContext; - public EthGetBlockByNumberAndHashShanghaiAcceptanceTest( - final String ignored, final URI testCaseFileURI) { - super(ignored, testsContext, testCaseFileURI); + public EthGetBlockByNumberAndHashShanghaiAcceptanceTest() { + super(testsContext); } - @BeforeClass + @BeforeAll public static void init() throws IOException { testsContext = new JsonRpcTestsContext(GENESIS_FILE); } - @Parameterized.Parameters(name = "{0}") - public static Iterable testCases() throws URISyntaxException { - return testCases(TEST_CASE_PATH); + public static Stream testCases() throws URISyntaxException { + return testCasesFromPath(TEST_CASE_PATH); } - @AfterClass + @AfterAll public static void tearDown() { testsContext.cluster.close(); } diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ExecutionEngineCancunBlockBuildingAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ExecutionEngineCancunBlockBuildingAcceptanceTest.java index 7fe498e4c94..a9acdd14c5b 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ExecutionEngineCancunBlockBuildingAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ExecutionEngineCancunBlockBuildingAcceptanceTest.java @@ -19,39 +19,35 @@ import org.hyperledger.besu.tests.acceptance.dsl.rpc.JsonRpcTestCase; import java.io.IOException; -import java.net.URI; import java.net.URISyntaxException; import java.net.URL; +import java.util.stream.Stream; import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.JsonNodeType; import com.fasterxml.jackson.databind.node.ObjectNode; import okhttp3.Call; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.params.provider.Arguments; -@RunWith(Parameterized.class) public class ExecutionEngineCancunBlockBuildingAcceptanceTest extends AbstractJsonRpcTest { private static final String GENESIS_FILE = "/jsonrpc/engine/cancun/genesis.json"; private static final String TEST_CASE_PATH = "/jsonrpc/engine/cancun/test-cases/block-production"; private static JsonRpcTestsContext testsContext; - public ExecutionEngineCancunBlockBuildingAcceptanceTest( - final String ignored, final URI testCaseFileURI) { - super(ignored, testsContext, testCaseFileURI); + public ExecutionEngineCancunBlockBuildingAcceptanceTest() { + super(testsContext); } - @BeforeClass + @BeforeAll public static void init() throws IOException { testsContext = new JsonRpcTestsContext(GENESIS_FILE); } - @Parameterized.Parameters(name = "{0}") - public static Iterable testCases() throws URISyntaxException { - return testCases(TEST_CASE_PATH); + public static Stream testCases() throws URISyntaxException { + return testCasesFromPath(TEST_CASE_PATH); } @Override @@ -90,7 +86,7 @@ protected void evaluateResponse( } } - @AfterClass + @AfterAll public static void tearDown() { testsContext.cluster.close(); } diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ExecutionEngineEip6110AcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ExecutionEngineEip6110AcceptanceTest.java index d1771ac5990..e77f011d9b4 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ExecutionEngineEip6110AcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ExecutionEngineEip6110AcceptanceTest.java @@ -15,36 +15,33 @@ package org.hyperledger.besu.tests.acceptance.jsonrpc; import java.io.IOException; -import java.net.URI; import java.net.URISyntaxException; +import java.util.stream.Stream; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.params.provider.Arguments; -@RunWith(Parameterized.class) public class ExecutionEngineEip6110AcceptanceTest extends AbstractJsonRpcTest { private static final String GENESIS_FILE = "/jsonrpc/engine/eip6110/genesis.json"; private static final String TEST_CASE_PATH = "/jsonrpc/engine/eip6110/test-cases/"; private static JsonRpcTestsContext testsContext; - public ExecutionEngineEip6110AcceptanceTest(final String ignored, final URI testCaseFileURI) { - super(ignored, testsContext, testCaseFileURI); + public ExecutionEngineEip6110AcceptanceTest() { + super(testsContext); } - @BeforeClass + @BeforeAll public static void init() throws IOException { testsContext = new JsonRpcTestsContext(GENESIS_FILE); } - @Parameterized.Parameters(name = "{0}") - public static Iterable testCases() throws URISyntaxException { - return testCases(TEST_CASE_PATH); + public static Stream testCases() throws URISyntaxException { + return testCasesFromPath(TEST_CASE_PATH); } - @AfterClass + @AfterAll public static void tearDown() { testsContext.cluster.close(); } diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ExecutionEngineParisAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ExecutionEngineParisAcceptanceTest.java index c6cb8a62ea4..e7cb8a9150e 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ExecutionEngineParisAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ExecutionEngineParisAcceptanceTest.java @@ -15,36 +15,33 @@ package org.hyperledger.besu.tests.acceptance.jsonrpc; import java.io.IOException; -import java.net.URI; import java.net.URISyntaxException; +import java.util.stream.Stream; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.params.provider.Arguments; -@RunWith(Parameterized.class) public class ExecutionEngineParisAcceptanceTest extends AbstractJsonRpcTest { private static final String GENESIS_FILE = "/jsonrpc/engine/paris/genesis.json"; private static final String TEST_CASE_PATH = "/jsonrpc/engine/paris/test-cases/"; private static JsonRpcTestsContext testsContext; - public ExecutionEngineParisAcceptanceTest(final String ignored, final URI testCaseFileURI) { - super(ignored, testsContext, testCaseFileURI); + public ExecutionEngineParisAcceptanceTest() { + super(testsContext); } - @BeforeClass + @BeforeAll public static void init() throws IOException { testsContext = new JsonRpcTestsContext(GENESIS_FILE); } - @Parameterized.Parameters(name = "{0}") - public static Iterable testCases() throws URISyntaxException { - return testCases(TEST_CASE_PATH); + public static Stream testCases() throws URISyntaxException { + return testCasesFromPath(TEST_CASE_PATH); } - @AfterClass + @AfterAll public static void tearDown() { testsContext.cluster.close(); } diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ExecutionEngineShanghaiAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ExecutionEngineShanghaiAcceptanceTest.java index c676af5922b..85f966e3d2d 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ExecutionEngineShanghaiAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ExecutionEngineShanghaiAcceptanceTest.java @@ -15,36 +15,32 @@ package org.hyperledger.besu.tests.acceptance.jsonrpc; import java.io.IOException; -import java.net.URI; -import java.net.URISyntaxException; +import java.util.stream.Stream; -import org.junit.AfterClass; -import org.junit.BeforeClass; -import org.junit.runner.RunWith; -import org.junit.runners.Parameterized; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.params.provider.Arguments; -@RunWith(Parameterized.class) public class ExecutionEngineShanghaiAcceptanceTest extends AbstractJsonRpcTest { private static final String GENESIS_FILE = "/jsonrpc/engine/shanghai/genesis.json"; private static final String TEST_CASE_PATH = "/jsonrpc/engine/shanghai/test-cases/"; private static JsonRpcTestsContext testsContext; - public ExecutionEngineShanghaiAcceptanceTest(final String ignored, final URI testCaseFileURI) { - super(ignored, testsContext, testCaseFileURI); + public ExecutionEngineShanghaiAcceptanceTest() { + super(testsContext); } - @BeforeClass + @BeforeAll public static void init() throws IOException { testsContext = new JsonRpcTestsContext(GENESIS_FILE); } - @Parameterized.Parameters(name = "{0}") - public static Iterable testCases() throws URISyntaxException { - return testCases(TEST_CASE_PATH); + public static Stream testCases() throws Exception { + return testCasesFromPath(TEST_CASE_PATH); } - @AfterClass + @AfterAll public static void tearDown() { testsContext.cluster.close(); } diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ipc/Web3JSupportAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ipc/Web3JSupportAcceptanceTest.java index c13c195cb33..b1887303ba2 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ipc/Web3JSupportAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/jsonrpc/ipc/Web3JSupportAcceptanceTest.java @@ -29,8 +29,8 @@ import java.util.Collections; import java.util.Locale; -import org.junit.Before; -import org.junit.Test; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; import org.web3j.protocol.Web3j; import org.web3j.protocol.core.Request; import org.web3j.protocol.core.methods.response.NetVersion; @@ -41,7 +41,7 @@ public class Web3JSupportAcceptanceTest extends AcceptanceTestBase { private Node node; private Path socketPath; - @Before + @BeforeEach public void setUp() throws Exception { socketPath = Files.createTempFile("besu-test-", ".ipc"); node =