diff --git a/.gitignore b/.gitignore index 4c1c2b4c..f266b41f 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ db-async-common/out/* mysql-async/out/* postgresql-async/out/* mysql-async/target/* +pool-async/target/* postgis-jasync/target/* .rvmrc .ruby-version diff --git a/gradle.properties b/gradle.properties index e5fc80f9..a0403687 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,7 +14,7 @@ JUNIT_VERSION=4.13.2 ASSERTJ_VERSION=3.23.1 MOCKK_VERSION=1.9 LOGBACK_VERSION=1.1.8 -TEST_CONTAINERS_VERSION=1.15.1 +TEST_CONTAINERS_VERSION=1.17.6 MYSQL_CONNECTOR_VERSION=5.1.47 AWAITILITY_VERSION=3.1.5 THREETEN_EXTRA=1.6.0 diff --git a/mysql-async/src/test/java/com/github/jasync/sql/db/mysql/ContainerHelper.java b/mysql-async/src/test/java/com/github/jasync/sql/db/mysql/ContainerHelper.java index 99151351..1f11b0a2 100644 --- a/mysql-async/src/test/java/com/github/jasync/sql/db/mysql/ContainerHelper.java +++ b/mysql-async/src/test/java/com/github/jasync/sql/db/mysql/ContainerHelper.java @@ -23,7 +23,7 @@ public class ContainerHelper { private static final Logger logger = LoggerFactory.getLogger(ContainerHelper.class); - public static MySQLContainer mysql; + public static MySQLContainer mysql; public static Path domainSocketPath; @@ -82,21 +82,21 @@ private static boolean isLocalMySQLRunning() { private static void startMySQLDocker() throws IOException { if (mysql == null) { - // MySQLContainer always sets the root password to be the same as the - // user password. For legacy reasons, we expect the root password to be - // different. mysql = new MySQLContainer("mysql:5.7.32") { @Override protected void configure() { super.configure(); // Make sure to do this after the call to `super` so these // really do override the environment variables. - addEnv("MYSQL_DATABASE", "mysql_async_tests"); - addEnv("MYSQL_USER", "mysql_async"); - addEnv("MYSQL_PASSWORD", "root"); + // MySQLContainer always sets the root password to be the same as the + // user password. For legacy reasons, we expect the root password to be + // different. addEnv("MYSQL_ROOT_PASSWORD", "test"); } - }; + }.withUsername("mysql_async") + .withPassword("root") + .withDatabaseName("mysql_async_tests"); + for (String file : Arrays.asList("ca.pem", "server-key.pem", "server-cert.pem", "update-config.sh")) { mysql.withClasspathResourceMapping(file, "/docker-entrypoint-initdb.d/" + file, BindMode.READ_ONLY); } diff --git a/r2dbc-mysql/src/test/java/com/github/jasync/r2dbc/mysql/integ/R2dbcContainerHelper.java b/r2dbc-mysql/src/test/java/com/github/jasync/r2dbc/mysql/integ/R2dbcContainerHelper.java index d321be44..99322772 100644 --- a/r2dbc-mysql/src/test/java/com/github/jasync/r2dbc/mysql/integ/R2dbcContainerHelper.java +++ b/r2dbc-mysql/src/test/java/com/github/jasync/r2dbc/mysql/integ/R2dbcContainerHelper.java @@ -19,7 +19,7 @@ public class R2dbcContainerHelper { private static final Logger logger = LoggerFactory.getLogger(R2dbcContainerHelper.class); - public static MySQLContainer mysql; + public static MySQLContainer mysql; public static Integer getPort() { return defaultConfiguration.getPort(); @@ -60,21 +60,21 @@ private static boolean isLocalMySQLRunning() { private static void startMySQLDocker() { if (mysql == null) { - // MySQLContainer always sets the root password to be the same as the - // user password. For legacy reasons, we expect the root password to be - // different. mysql = new MySQLContainer("mysql:5.7.32") { @Override protected void configure() { super.configure(); // Make sure to do this after the call to `super` so these // really do override the environment variables. - addEnv("MYSQL_DATABASE", "mysql_async_tests"); - addEnv("MYSQL_USER", "mysql_async"); - addEnv("MYSQL_PASSWORD", "root"); + // MySQLContainer always sets the root password to be the same as the + // user password. For legacy reasons, we expect the root password to be + // different. addEnv("MYSQL_ROOT_PASSWORD", "test"); } - }; + }.withUsername("mysql_async") + .withPassword("root") + .withDatabaseName("mysql_async_tests"); + for (String file : Arrays.asList("ca.pem", "server-key.pem", "server-cert.pem", "update-config.sh")) { mysql.withClasspathResourceMapping(file, "/docker-entrypoint-initdb.d/" + file, BindMode.READ_ONLY); }