44import com .zaxxer .hikari .HikariDataSource ;
55import org .apache .commons .dbutils .QueryRunner ;
66import org .apache .commons .lang3 .SystemUtils ;
7- import org .junit .AfterClass ;
8- import org .junit .Test ;
9- import org .junit .runners .Parameterized .Parameter ;
7+ import org .junit .jupiter .api .AfterAll ;
8+ import org .junit .jupiter .api .Test ;
9+ import org .junit .jupiter .params .Parameter ;
10+ import org .junit .jupiter .params .ParameterizedClass ;
11+ import org .junit .jupiter .params .provider .MethodSource ;
1012
1113import java .sql .Connection ;
1214import java .sql .ResultSet ;
1719import static org .assertj .core .api .Assertions .assertThat ;
1820import static org .junit .Assume .assumeFalse ;
1921
22+ @ ParameterizedClass
23+ @ MethodSource ("data" )
2024public class AbstractJDBCDriverTest {
2125
2226 protected enum Options {
@@ -27,7 +31,7 @@ protected enum Options {
2731 PmdKnownBroken ,
2832 }
2933
30- @ Parameter
34+ @ Parameter ( 0 )
3135 public String jdbcUrl ;
3236
3337 @ Parameter (1 )
@@ -39,13 +43,13 @@ public static void sampleInitFunction(Connection connection) throws SQLException
3943 connection .createStatement ().execute ("CREATE TABLE my_counter (\n " + " n INT\n " + ");" );
4044 }
4145
42- @ AfterClass
46+ @ AfterAll
4347 public static void testCleanup () {
4448 ContainerDatabaseDriver .killContainers ();
4549 }
4650
4751 @ Test
48- public void test () throws SQLException {
52+ void test () throws SQLException {
4953 try (HikariDataSource dataSource = getDataSource (jdbcUrl , 1 )) {
5054 performSimpleTest (dataSource );
5155
0 commit comments