Skip to content

Commit 7593a30

Browse files
authored
Move ScyllaDB tests to JUnit Jupiter (#10763)
1 parent dc008e3 commit 7593a30

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

modules/scylladb/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@ description = "Testcontainers :: ScyllaDB"
33
dependencies {
44
api project(":testcontainers")
55

6+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.11.0'
7+
8+
testImplementation 'org.junit.jupiter:junit-jupiter:5.13.4'
69
testImplementation 'com.scylladb:java-driver-core:4.19.0.1'
710
testImplementation 'org.assertj:assertj-core:3.27.3'
811
testImplementation 'software.amazon.awssdk:dynamodb:2.32.30'
912
}
13+
14+
test {
15+
useJUnitPlatform()
16+
}

modules/scylladb/src/test/java/org/testcontainers/scylladb/ScyllaDBContainerTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import com.datastax.oss.driver.api.core.CqlSession;
44
import com.datastax.oss.driver.api.core.cql.ResultSet;
5-
import org.junit.Test;
5+
import org.junit.jupiter.api.Test;
66
import org.testcontainers.containers.Container;
77
import org.testcontainers.utility.DockerImageName;
88
import org.testcontainers.utility.MountableFile;
@@ -35,14 +35,14 @@
3535
import static org.assertj.core.api.Assertions.assertThat;
3636
import static org.assertj.core.api.Assertions.assertThatThrownBy;
3737

38-
public class ScyllaDBContainerTest {
38+
class ScyllaDBContainerTest {
3939

4040
private static final DockerImageName SCYLLADB_IMAGE = DockerImageName.parse("scylladb/scylla:6.2");
4141

4242
private static final String BASIC_QUERY = "SELECT release_version FROM system.local";
4343

4444
@Test
45-
public void testSimple() {
45+
void testSimple() {
4646
try ( // container {
4747
ScyllaDBContainer scylladb = new ScyllaDBContainer("scylladb/scylla:6.2")
4848
// }
@@ -63,7 +63,7 @@ public void testSimple() {
6363
}
6464

6565
@Test
66-
public void testSimpleSsl()
66+
void testSimpleSsl()
6767
throws NoSuchAlgorithmException, KeyStoreException, IOException, CertificateException, UnrecoverableKeyException, KeyManagementException {
6868
try (
6969
// customConfiguration {
@@ -121,7 +121,7 @@ public void testSimpleSsl()
121121
}
122122

123123
@Test
124-
public void testSimpleSslCqlsh() throws IllegalStateException, InterruptedException, IOException {
124+
void testSimpleSslCqlsh() throws IllegalStateException, InterruptedException, IOException {
125125
try (
126126
ScyllaDBContainer scylladb = new ScyllaDBContainer(SCYLLADB_IMAGE)
127127
.withConfigurationOverride("scylla-test-ssl")
@@ -144,7 +144,7 @@ public void testSimpleSslCqlsh() throws IllegalStateException, InterruptedExcept
144144
}
145145

146146
@Test
147-
public void testShardAwareness() {
147+
void testShardAwareness() {
148148
try (ScyllaDBContainer scylladb = new ScyllaDBContainer(SCYLLADB_IMAGE)) {
149149
scylladb.start();
150150
// shardAwarenessSession {
@@ -161,7 +161,7 @@ public void testShardAwareness() {
161161
}
162162

163163
@Test
164-
public void testAlternator() {
164+
void testAlternator() {
165165
try ( // alternator {
166166
ScyllaDBContainer scylladb = new ScyllaDBContainer(SCYLLADB_IMAGE).withAlternator()
167167
// }
@@ -192,7 +192,7 @@ public void testAlternator() {
192192
}
193193

194194
@Test
195-
public void throwExceptionWhenAlternatorDisabled() {
195+
void throwExceptionWhenAlternatorDisabled() {
196196
try (ScyllaDBContainer scylladb = new ScyllaDBContainer(SCYLLADB_IMAGE)) {
197197
scylladb.start();
198198
assertThatThrownBy(scylladb::getAlternatorEndpoint)

0 commit comments

Comments
 (0)