File tree Expand file tree Collapse file tree 3 files changed +12
-9
lines changed
src/test/java/org/testcontainers Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,15 @@ description = "Testcontainers :: JDBC :: TiDB"
33dependencies {
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 ' mysql:mysql-connector-java:8.0.33'
811
912 compileOnly ' org.jetbrains:annotations:26.0.2'
1013}
14+
15+ test {
16+ useJUnitPlatform()
17+ }
Original file line number Diff line number Diff line change 11package org .testcontainers .jdbc .tidb ;
22
3- import org .junit .runner .RunWith ;
4- import org .junit .runners .Parameterized ;
53import org .testcontainers .jdbc .AbstractJDBCDriverTest ;
64
75import java .util .Arrays ;
86import java .util .EnumSet ;
97
10- @ RunWith (Parameterized .class )
118public class TiDBJDBCDriverTest extends AbstractJDBCDriverTest {
129
13- @ Parameterized .Parameters (name = "{index} - {0}" )
1410 public static Iterable <Object []> data () {
1511 return Arrays .asList (
1612 new Object [][] { { "jdbc:tc:tidb://hostname/databasename" , EnumSet .noneOf (Options .class ) } }
Original file line number Diff line number Diff line change 11package org .testcontainers .junit .tidb ;
22
3- import org .junit .Test ;
3+ import org .junit .jupiter . api . Test ;
44import org .testcontainers .TiDBTestImages ;
55import org .testcontainers .db .AbstractContainerDatabaseTest ;
66import org .testcontainers .tidb .TiDBContainer ;
1010
1111import static org .assertj .core .api .Assertions .assertThat ;
1212
13- public class SimpleTiDBTest extends AbstractContainerDatabaseTest {
13+ class SimpleTiDBTest extends AbstractContainerDatabaseTest {
1414
1515 @ Test
16- public void testSimple () throws SQLException {
16+ void testSimple () throws SQLException {
1717 try ( // container {
1818 TiDBContainer tidb = new TiDBContainer ("pingcap/tidb:v6.1.0" )
1919 // }
@@ -29,7 +29,7 @@ public void testSimple() throws SQLException {
2929 }
3030
3131 @ Test
32- public void testExplicitInitScript () throws SQLException {
32+ void testExplicitInitScript () throws SQLException {
3333 try (
3434 TiDBContainer tidb = new TiDBContainer (TiDBTestImages .TIDB_IMAGE ).withInitScript ("somepath/init_tidb.sql" )
3535 ) { // TiDB is expected to be compatible with MySQL
@@ -43,7 +43,7 @@ public void testExplicitInitScript() throws SQLException {
4343 }
4444
4545 @ Test
46- public void testWithAdditionalUrlParamInJdbcUrl () {
46+ void testWithAdditionalUrlParamInJdbcUrl () {
4747 TiDBContainer tidb = new TiDBContainer (TiDBTestImages .TIDB_IMAGE ).withUrlParam ("sslmode" , "disable" );
4848
4949 try {
You can’t perform that action at this time.
0 commit comments