diff --git a/modules/scylladb/build.gradle b/modules/scylladb/build.gradle index 7aa6376fd54..b0551714a3a 100644 --- a/modules/scylladb/build.gradle +++ b/modules/scylladb/build.gradle @@ -3,7 +3,14 @@ description = "Testcontainers :: ScyllaDB" dependencies { api project(":testcontainers") + testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.11.0' + + testImplementation 'org.junit.jupiter:junit-jupiter:5.13.4' testImplementation 'com.scylladb:java-driver-core:4.19.0.1' testImplementation 'org.assertj:assertj-core:3.27.3' testImplementation 'software.amazon.awssdk:dynamodb:2.32.30' } + +test { + useJUnitPlatform() +} diff --git a/modules/scylladb/src/test/java/org/testcontainers/scylladb/ScyllaDBContainerTest.java b/modules/scylladb/src/test/java/org/testcontainers/scylladb/ScyllaDBContainerTest.java index d151424fd20..d500aa74868 100644 --- a/modules/scylladb/src/test/java/org/testcontainers/scylladb/ScyllaDBContainerTest.java +++ b/modules/scylladb/src/test/java/org/testcontainers/scylladb/ScyllaDBContainerTest.java @@ -2,7 +2,7 @@ import com.datastax.oss.driver.api.core.CqlSession; import com.datastax.oss.driver.api.core.cql.ResultSet; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.testcontainers.containers.Container; import org.testcontainers.utility.DockerImageName; import org.testcontainers.utility.MountableFile; @@ -35,14 +35,14 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -public class ScyllaDBContainerTest { +class ScyllaDBContainerTest { private static final DockerImageName SCYLLADB_IMAGE = DockerImageName.parse("scylladb/scylla:6.2"); private static final String BASIC_QUERY = "SELECT release_version FROM system.local"; @Test - public void testSimple() { + void testSimple() { try ( // container { ScyllaDBContainer scylladb = new ScyllaDBContainer("scylladb/scylla:6.2") // } @@ -63,7 +63,7 @@ public void testSimple() { } @Test - public void testSimpleSsl() + void testSimpleSsl() throws NoSuchAlgorithmException, KeyStoreException, IOException, CertificateException, UnrecoverableKeyException, KeyManagementException { try ( // customConfiguration { @@ -121,7 +121,7 @@ public void testSimpleSsl() } @Test - public void testSimpleSslCqlsh() throws IllegalStateException, InterruptedException, IOException { + void testSimpleSslCqlsh() throws IllegalStateException, InterruptedException, IOException { try ( ScyllaDBContainer scylladb = new ScyllaDBContainer(SCYLLADB_IMAGE) .withConfigurationOverride("scylla-test-ssl") @@ -144,7 +144,7 @@ public void testSimpleSslCqlsh() throws IllegalStateException, InterruptedExcept } @Test - public void testShardAwareness() { + void testShardAwareness() { try (ScyllaDBContainer scylladb = new ScyllaDBContainer(SCYLLADB_IMAGE)) { scylladb.start(); // shardAwarenessSession { @@ -161,7 +161,7 @@ public void testShardAwareness() { } @Test - public void testAlternator() { + void testAlternator() { try ( // alternator { ScyllaDBContainer scylladb = new ScyllaDBContainer(SCYLLADB_IMAGE).withAlternator() // } @@ -192,7 +192,7 @@ public void testAlternator() { } @Test - public void throwExceptionWhenAlternatorDisabled() { + void throwExceptionWhenAlternatorDisabled() { try (ScyllaDBContainer scylladb = new ScyllaDBContainer(SCYLLADB_IMAGE)) { scylladb.start(); assertThatThrownBy(scylladb::getAlternatorEndpoint)