Skip to content

Commit b570f26

Browse files
committed
Move Presto tests to JUnit Jupiter
1 parent 86d102f commit b570f26

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

modules/presto/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@ description = "Testcontainers :: JDBC :: Presto"
33
dependencies {
44
api project(':testcontainers-jdbc')
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 project(':testcontainers-jdbc-test')
710
testRuntimeOnly 'io.prestosql:presto-jdbc:350'
811
compileOnly 'org.jetbrains:annotations:26.0.2'
912
}
13+
14+
test {
15+
useJUnitPlatform()
16+
}

modules/presto/src/test/java/org/testcontainers/containers/PrestoContainerTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package org.testcontainers.containers;
22

3-
import org.junit.Test;
3+
import org.junit.jupiter.api.Test;
44
import org.testcontainers.PrestoTestImages;
55

66
import java.sql.Connection;
@@ -14,10 +14,10 @@
1414

1515
import static org.assertj.core.api.Assertions.assertThat;
1616

17-
public class PrestoContainerTest {
17+
class PrestoContainerTest {
1818

1919
@Test
20-
public void testSimple() throws Exception {
20+
void testSimple() throws Exception {
2121
try (PrestoContainer<?> prestoSql = new PrestoContainer<>(PrestoTestImages.PRESTO_TEST_IMAGE)) {
2222
prestoSql.start();
2323
try (
@@ -35,7 +35,7 @@ public void testSimple() throws Exception {
3535
}
3636

3737
@Test
38-
public void testSpecificVersion() throws Exception {
38+
void testSpecificVersion() throws Exception {
3939
try (
4040
PrestoContainer<?> prestoSql = new PrestoContainer<>(PrestoTestImages.PRESTO_PREVIOUS_VERSION_TEST_IMAGE)
4141
) {
@@ -54,7 +54,7 @@ public void testSpecificVersion() throws Exception {
5454
}
5555

5656
@Test
57-
public void testQueryMemoryAndTpch() throws SQLException {
57+
void testQueryMemoryAndTpch() throws SQLException {
5858
try (PrestoContainer<?> prestoSql = new PrestoContainer<>(PrestoTestImages.PRESTO_TEST_IMAGE)) {
5959
prestoSql.start();
6060
try (
@@ -88,7 +88,7 @@ public void testQueryMemoryAndTpch() throws SQLException {
8888
}
8989

9090
@Test
91-
public void testInitScript() throws Exception {
91+
void testInitScript() throws Exception {
9292
try (PrestoContainer<?> prestoSql = new PrestoContainer<>(PrestoTestImages.PRESTO_TEST_IMAGE)) {
9393
prestoSql.withInitScript("initial.sql");
9494
prestoSql.start();
@@ -105,7 +105,7 @@ public void testInitScript() throws Exception {
105105
}
106106

107107
@Test
108-
public void testTcJdbcUri() throws Exception {
108+
void testTcJdbcUri() throws Exception {
109109
try (
110110
Connection connection = DriverManager.getConnection(
111111
String.format("jdbc:tc:presto:%s://hostname/", PrestoContainer.DEFAULT_TAG)

modules/presto/src/test/java/org/testcontainers/jdbc/presto/PrestoJDBCDriverTest.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
package org.testcontainers.jdbc.presto;
22

3-
import org.junit.runner.RunWith;
4-
import org.junit.runners.Parameterized;
53
import org.testcontainers.jdbc.AbstractJDBCDriverTest;
64

75
import java.util.Arrays;
86
import java.util.EnumSet;
97

10-
@RunWith(Parameterized.class)
11-
public class PrestoJDBCDriverTest extends AbstractJDBCDriverTest {
8+
class PrestoJDBCDriverTest extends AbstractJDBCDriverTest {
129

13-
@Parameterized.Parameters(name = "{index} - {0}")
1410
public static Iterable<Object[]> data() {
1511
return Arrays.asList(
1612
new Object[][] { //

0 commit comments

Comments
 (0)