From 76060a0416913b711d7b64072e1218622fd0d52f Mon Sep 17 00:00:00 2001 From: Sally MacFarlane Date: Wed, 23 Oct 2024 07:52:51 +1000 Subject: [PATCH] [TESTING] remove junit4 dependency (#7793) * migrate to junit5 * remove junit4 dep * remove vintage dep Signed-off-by: Sally MacFarlane --------- Signed-off-by: Sally MacFarlane --- acceptance-tests/dsl/build.gradle | 1 - acceptance-tests/test-plugins/build.gradle | 2 -- acceptance-tests/tests/build.gradle | 3 --- .../tests/acceptance/mining/MiningAcceptanceTest.java | 10 +++++----- ethereum/evmtool/build.gradle | 2 -- platform/build.gradle | 2 -- plugins/rocksdb/build.gradle | 2 -- 7 files changed, 5 insertions(+), 17 deletions(-) diff --git a/acceptance-tests/dsl/build.gradle b/acceptance-tests/dsl/build.gradle index 6c9090fe9b9..aa5db9ce1e7 100644 --- a/acceptance-tests/dsl/build.gradle +++ b/acceptance-tests/dsl/build.gradle @@ -33,7 +33,6 @@ dependencies { implementation 'info.picocli:picocli' implementation 'io.reactivex.rxjava2:rxjava' implementation 'io.vertx:vertx-core' - implementation 'junit:junit' implementation 'io.opentelemetry:opentelemetry-api' implementation 'io.tmio:tuweni-bytes' implementation 'io.tmio:tuweni-io' diff --git a/acceptance-tests/test-plugins/build.gradle b/acceptance-tests/test-plugins/build.gradle index 65a3dc64dc8..7c70c52c81f 100644 --- a/acceptance-tests/test-plugins/build.gradle +++ b/acceptance-tests/test-plugins/build.gradle @@ -14,8 +14,6 @@ dependencies { testImplementation 'org.assertj:assertj-core' testImplementation 'org.junit.jupiter:junit-jupiter' - - testRuntimeOnly 'org.junit.vintage:junit-vintage-engine' } task testPluginsJar(type: Jar) { diff --git a/acceptance-tests/tests/build.gradle b/acceptance-tests/tests/build.gradle index 809d82957b2..e9724151abd 100644 --- a/acceptance-tests/tests/build.gradle +++ b/acceptance-tests/tests/build.gradle @@ -68,7 +68,6 @@ dependencies { testImplementation 'io.opentracing:opentracing-api' testImplementation 'io.opentracing:opentracing-util' testImplementation 'io.vertx:vertx-core' - testImplementation 'junit:junit' testImplementation 'org.apache.commons:commons-compress' testImplementation 'org.apache.logging.log4j:log4j-core' testImplementation 'io.tmio:tuweni-crypto' @@ -81,8 +80,6 @@ dependencies { testImplementation 'org.web3j:core' testImplementation 'org.wiremock:wiremock' testImplementation project(path: ':acceptance-tests:tests:shanghai') - - testRuntimeOnly 'org.junit.vintage:junit-vintage-engine' } test.enabled = false diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/mining/MiningAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/mining/MiningAcceptanceTest.java index 69d6d19d18e..a0de84fb3b2 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/mining/MiningAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/mining/MiningAcceptanceTest.java @@ -18,21 +18,21 @@ import org.hyperledger.besu.tests.acceptance.dsl.account.Account; 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 MiningAcceptanceTest extends AcceptanceTestBase { +class MiningAcceptanceTest extends AcceptanceTestBase { private Node minerNode; - @Before + @BeforeEach public void setUp() throws Exception { minerNode = besu.createMinerNode("miner1"); cluster.start(minerNode); } @Test - public void shouldMineTransactions() { + void shouldMineTransactions() { final Account sender = accounts.createAccount("account1"); final Account receiver = accounts.createAccount("account2"); minerNode.execute(accountTransactions.createTransfer(sender, 50)); diff --git a/ethereum/evmtool/build.gradle b/ethereum/evmtool/build.gradle index c4c83883b57..b62287b0cae 100644 --- a/ethereum/evmtool/build.gradle +++ b/ethereum/evmtool/build.gradle @@ -65,8 +65,6 @@ dependencies { testImplementation 'org.mockito:mockito-core' testImplementation 'org.mockito:mockito-junit-jupiter' - testRuntimeOnly 'org.junit.vintage:junit-vintage-engine' - // No logging in graalvm EvmTool nativeImageClasspath 'org.slf4j:slf4j-nop' } diff --git a/platform/build.gradle b/platform/build.gradle index e42d3e0774b..2fda97e8663 100644 --- a/platform/build.gradle +++ b/platform/build.gradle @@ -109,8 +109,6 @@ dependencies { api 'io.tmio:tuweni-toml:2.4.2' api 'io.tmio:tuweni-units:2.4.2' - api 'junit:junit:4.13.2' - api 'net.java.dev.jna:jna:5.15.0' api 'org.antlr:antlr4:4.11.1' diff --git a/plugins/rocksdb/build.gradle b/plugins/rocksdb/build.gradle index e5ca782504a..d487cf9824c 100644 --- a/plugins/rocksdb/build.gradle +++ b/plugins/rocksdb/build.gradle @@ -58,6 +58,4 @@ dependencies { testImplementation 'org.junit.jupiter:junit-jupiter' testImplementation 'org.assertj:assertj-core' testImplementation 'org.mockito:mockito-junit-jupiter' - - testRuntimeOnly 'org.junit.vintage:junit-vintage-engine' }