Skip to content

Commit

Permalink
Update to Spring Boot 3.4.0, fix strang issues with MySQL and SQL Ser…
Browse files Browse the repository at this point in the history
…ver, remove docker directory
  • Loading branch information
nkonev committed Nov 23, 2024
1 parent ff1dc43 commit c5ef9f8
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 141 deletions.
64 changes: 0 additions & 64 deletions docker/docker-compose.yml

This file was deleted.

7 changes: 0 additions & 7 deletions docker/mssql/mssql.conf

This file was deleted.

4 changes: 0 additions & 4 deletions docker/mysql/docker-entrypoint-initdb.d/init-db.sql

This file was deleted.

38 changes: 0 additions & 38 deletions docker/postgresql/docker-entrypoint-initdb.d/init-r2dbc-db.sql

This file was deleted.

5 changes: 1 addition & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

<properties>
<java.version>17</java.version>
<spring.boot.version>3.2.0</spring.boot.version>
<spring.boot.version>3.4.0</spring.boot.version>
<maven.surefire.plugin.version>3.0.0-M7</maven.surefire.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
Expand All @@ -50,9 +50,6 @@
<central.publishing.maven.plugin.version>0.3.0</central.publishing.maven.plugin.version>
<maven.gpg.plugin>3.0.1</maven.gpg.plugin>
<reflections.version>0.10.2</reflections.version>
<mssql.driver.version>1.0.1.RELEASE</mssql.driver.version>
<mysql.driver.version>1.0.1</mysql.driver.version>
<mariadb.driver.version>1.1.4</mariadb.driver.version>
<logcaptor.version>2.9.0</logcaptor.version>
</properties>

Expand Down
3 changes: 0 additions & 3 deletions r2dbc-migrate-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
<dependency>
<groupId>io.r2dbc</groupId>
<artifactId>r2dbc-mssql</artifactId>
<version>${mssql.driver.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -59,7 +58,6 @@
<dependency>
<groupId>io.asyncer</groupId>
<artifactId>r2dbc-mysql</artifactId>
<version>${mysql.driver.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -75,7 +73,6 @@
<dependency>
<groupId>org.mariadb</groupId>
<artifactId>r2dbc-mariadb</artifactId>
<version>${mariadb.driver.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public class MariadbTestcontainersTest extends AbstractMysqlLikeTestcontainersTe
@BeforeEach
public void beforeEach() {
container = new GenericContainer("mariadb:10.5.8-focal")
.withClasspathResourceMapping("/docker/mysql/etc/mysql/conf.d", "/etc/mysql/conf.d", BindMode.READ_ONLY)
.withClasspathResourceMapping("/docker/mysql/docker-entrypoint-initdb.d", "/docker-entrypoint-initdb.d", BindMode.READ_ONLY)
.withClasspathResourceMapping("/docker/mariadb/etc/mysql/conf.d", "/etc/mysql/conf.d", BindMode.READ_ONLY)
.withClasspathResourceMapping("/docker/mariadb/docker-entrypoint-initdb.d", "/docker-entrypoint-initdb.d", BindMode.READ_ONLY)
.withEnv("MYSQL_ALLOW_EMPTY_PASSWORD", "true")
.withExposedPorts(MYSQL_PORT)
.withStartupTimeout(Duration.ofSeconds(waitTestcontainersSeconds));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void testThatMigratorCanHandleSituationWhenDatabaseStillStarting() {
Thread thread = new Thread(() -> {
LOGGER.info("Sleeping random {} seconds before start the container", randomInteger);
Uninterruptibles.sleepUninterruptibly(randomInteger, TimeUnit.SECONDS);
container = new GenericContainer("mcr.microsoft.com/mssql/server:2019-CU12-ubuntu-16.04")
container = new GenericContainer("mcr.microsoft.com/mssql/server:2022-CU16-ubuntu-22.04")
.withExposedPorts(MSSQL_HARDCODED_PORT)
.withEnv("ACCEPT_EULA", "Y")
.withEnv("SA_PASSWORD", password)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class MssqlTestcontainersTest {

@BeforeEach
public void beforeEach() {
container = new GenericContainer("mcr.microsoft.com/mssql/server:2017-CU22-ubuntu-16.04")
container = new GenericContainer("mcr.microsoft.com/mssql/server:2022-CU16-ubuntu-22.04")
.withExposedPorts(MSSQL_PORT)
.withEnv("ACCEPT_EULA", "Y")
.withEnv("SA_PASSWORD", password)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ public class MysqlTestcontainersTest extends AbstractMysqlLikeTestcontainersTest

private GenericContainer container;

final static String user = "mysql-user";
final static String password = "mysql-password";
final static String user = "root";
final static String password = "my-secret-pw";

@BeforeEach
public void beforeEach() {
container = new GenericContainer("mysql:5.7")
.withClasspathResourceMapping("/docker/mysql/etc/mysql/conf.d", "/etc/mysql/conf.d", BindMode.READ_ONLY)
container = new GenericContainer("mysql:8.4.3")
.withClasspathResourceMapping("/docker/mysql/docker-entrypoint-initdb.d", "/docker-entrypoint-initdb.d", BindMode.READ_ONLY)
.withEnv("MYSQL_ALLOW_EMPTY_PASSWORD", "true")
.withEnv("MYSQL_ROOT_PASSWORD", password)
.withExposedPorts(MYSQL_PORT)
.withCommand("--character-set-server=utf8", "--collation-server=utf8_unicode_ci", "--mysql-native-password=ON")
.withStartupTimeout(Duration.ofSeconds(waitTestcontainersSeconds));

container.start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class PostgresTestcontainersTest {

@BeforeEach
public void beforeEach() {
container = new GenericContainer("postgres:13.4")
container = new GenericContainer("postgres:14.1-alpine3.14")
.withExposedPorts(POSTGRESQL_PORT)
.withEnv("POSTGRES_PASSWORD", "postgresqlPassword")
.withClasspathResourceMapping("/docker/postgresql/docker-entrypoint-initdb.d", "/docker-entrypoint-initdb.d", BindMode.READ_ONLY)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CREATE DATABASE r2dbc;
use r2dbc;
GRANT ALL PRIVILEGES ON r2dbc.* TO 'mysql-user'@'%' IDENTIFIED BY 'mysql-password';

create database `my scheme`;
use `my scheme`;
GRANT ALL PRIVILEGES ON `my scheme`.* TO 'mysql-user'@'%' IDENTIFIED BY 'mysql-password';
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'my-secret-pw';

CREATE DATABASE r2dbc;
use r2dbc;
GRANT ALL PRIVILEGES ON r2dbc.* TO 'mysql-user'@'%' IDENTIFIED BY 'mysql-password';

create database `my scheme`;
use `my scheme`;
GRANT ALL PRIVILEGES ON `my scheme`.* TO 'mysql-user'@'%' IDENTIFIED BY 'mysql-password';
use `my scheme`;

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class R2dbcMigrateAutoConfigurationTest {

@BeforeEach
public void beforeEach() {
container = new GenericContainer("postgres:13.4")
container = new GenericContainer("postgres:14.1-alpine3.14")
.withExposedPorts(POSTGRESQL_PORT)
.withEnv("POSTGRES_PASSWORD", POSTGRESQL_PASSWORD)
.waitingFor(new LogMessageWaitStrategy().withRegEx(".*database system is ready to accept connections.*\\s")
Expand Down

0 comments on commit c5ef9f8

Please sign in to comment.