Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.kiwiproject.dropwizard.error.dao.jdbi3;

import static org.kiwiproject.dropwizard.error.util.TestHelpers.migrateDatabase;
import static org.kiwiproject.dropwizard.error.util.TestHelpers.newLatestMySQLContainer;
import static org.kiwiproject.dropwizard.error.util.TestHelpers.newLtsMySQLContainer;

import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.DisplayName;
Expand All @@ -16,7 +16,7 @@
class MySqlJdbi3ApplicationErrorDaoTest extends AbstractJdbi3ApplicationErrorDaoTest {

@Container
private static final MySQLContainer<?> MYSQL = newLatestMySQLContainer();
private static final MySQLContainer<?> MYSQL = newLtsMySQLContainer();

@RegisterExtension
final Jdbi3DaoExtension<Jdbi3ApplicationErrorDao> jdbi3DaoExtension =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.kiwiproject.dropwizard.error.dao.jdk;

import static org.kiwiproject.dropwizard.error.util.TestHelpers.migrateDatabase;
import static org.kiwiproject.dropwizard.error.util.TestHelpers.newLatestMySQLContainer;
import static org.kiwiproject.dropwizard.error.util.TestHelpers.newLtsMySQLContainer;

import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.DisplayName;
Expand All @@ -17,7 +17,7 @@ class MySqlJdbcApplicationErrorDaoTest extends AbstractJdbcApplicationErrorDaoTe
private static SimpleSingleConnectionDataSource dataSource;

@Container
private static final MySQLContainer<?> MYSQL = newLatestMySQLContainer();
private static final MySQLContainer<?> MYSQL = newLtsMySQLContainer();

@BeforeAll
static void beforeAll() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@
import org.testcontainers.containers.MySQLContainer;
import org.testcontainers.utility.DockerImageName;

import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import javax.sql.DataSource;

@UtilityClass
@Slf4j
public class TestHelpers {
Expand All @@ -41,8 +40,8 @@ private static void checkIsH2Connection(Connection conn) throws SQLException {
"Connection is not to an H2 database. Database product name: %s", databaseProductName);
}

public static MySQLContainer<?> newLatestMySQLContainer() {
return new MySQLContainer<>(DockerImageName.parse("mysql:latest"));
public static MySQLContainer<?> newLtsMySQLContainer() {
return new MySQLContainer<>(DockerImageName.parse("mysql:lts"));
}

/**
Expand Down