diff --git a/src/test/java/org/kiwiproject/dropwizard/error/dao/jdbi3/MySqlJdbi3ApplicationErrorDaoTest.java b/src/test/java/org/kiwiproject/dropwizard/error/dao/jdbi3/MySqlJdbi3ApplicationErrorDaoTest.java index c941f58..ad67f5f 100644 --- a/src/test/java/org/kiwiproject/dropwizard/error/dao/jdbi3/MySqlJdbi3ApplicationErrorDaoTest.java +++ b/src/test/java/org/kiwiproject/dropwizard/error/dao/jdbi3/MySqlJdbi3ApplicationErrorDaoTest.java @@ -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; @@ -16,7 +16,7 @@ class MySqlJdbi3ApplicationErrorDaoTest extends AbstractJdbi3ApplicationErrorDaoTest { @Container - private static final MySQLContainer MYSQL = newLatestMySQLContainer(); + private static final MySQLContainer MYSQL = newLtsMySQLContainer(); @RegisterExtension final Jdbi3DaoExtension jdbi3DaoExtension = diff --git a/src/test/java/org/kiwiproject/dropwizard/error/dao/jdk/MySqlJdbcApplicationErrorDaoTest.java b/src/test/java/org/kiwiproject/dropwizard/error/dao/jdk/MySqlJdbcApplicationErrorDaoTest.java index e7fb852..ab04c9e 100644 --- a/src/test/java/org/kiwiproject/dropwizard/error/dao/jdk/MySqlJdbcApplicationErrorDaoTest.java +++ b/src/test/java/org/kiwiproject/dropwizard/error/dao/jdk/MySqlJdbcApplicationErrorDaoTest.java @@ -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; @@ -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() { diff --git a/src/test/java/org/kiwiproject/dropwizard/error/util/TestHelpers.java b/src/test/java/org/kiwiproject/dropwizard/error/util/TestHelpers.java index e214786..c587840 100644 --- a/src/test/java/org/kiwiproject/dropwizard/error/util/TestHelpers.java +++ b/src/test/java/org/kiwiproject/dropwizard/error/util/TestHelpers.java @@ -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 { @@ -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")); } /**