Skip to content

Commit

Permalink
[hibernate#1406] Upgrade MySQL db and connector to 8.0.31
Browse files Browse the repository at this point in the history
Note that the GAV for the connector have changed to comply the naming
guidelines: from `mysql:mysql-connector-java` to
`com.mysql:mysql-connector-j`
  • Loading branch information
DavideD committed Oct 18, 2022
1 parent c838d68 commit d112222
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
# Label used to access the service container
mysql:
# Docker Hub image
image: mysql:8.0.28
image: mysql:8.0.31
env:
MYSQL_ROOT_PASSWORD: hreact
MYSQL_DATABASE: hreact
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tracking-orm-5.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
# Label used to access the service container
mysql:
# Docker Hub image
image: mysql:8.0.28
image: mysql:8.0.31
env:
MYSQL_ROOT_PASSWORD: hreact
MYSQL_DATABASE: hreact
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tracking-vertx-4.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
# Label used to access the service container
mysql:
# Docker Hub image
image: mysql:8.0.28
image: mysql:8.0.31
env:
MYSQL_ROOT_PASSWORD: hreact
MYSQL_DATABASE: hreact
Expand Down
2 changes: 1 addition & 1 deletion hibernate-reactive-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies {
testRuntimeOnly "org.mariadb.jdbc:mariadb-java-client:3.0.7";

// JDBC driver for Testcontainers with MYSQL Server
testRuntimeOnly "mysql:mysql-connector-java:8.0.28";
testRuntimeOnly "com.mysql:mysql-connector-j:8.0.31";

// EHCache
testRuntimeOnly "org.ehcache:ehcache:3.10.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class MySQLDatabase implements TestableDatabase {
* TIP: To reuse the same containers across multiple runs, set `testcontainers.reuse.enable=true` in a file located
* at `$HOME/.testcontainers.properties` (create the file if it does not exist).
*/
public static final MySQLContainer<?> mysql = new MySQLContainer<>( imageName( "mysql", "8.0.30") )
public static final MySQLContainer<?> mysql = new MySQLContainer<>( imageName( "mysql", "8.0.31") )
.withUsername( DatabaseConfiguration.USERNAME )
.withPassword( DatabaseConfiguration.PASSWORD )
.withDatabaseName( DatabaseConfiguration.DB_NAME )
Expand Down
2 changes: 1 addition & 1 deletion podman.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ and schema to run the tests:
```
podman run --rm --name HibernateTestingMySQL \
-e MYSQL_ROOT_PASSWORD=hreact -e MYSQL_DATABASE=hreact -e MYSQL_USER=hreact -e MYSQL_PASSWORD=hreact \
-p 3306:3306 mysql:8.0.28
-p 3306:3306 mysql:8.0.31
```

When the database has started, you can run the tests on MySQL with:
Expand Down
4 changes: 2 additions & 2 deletions tooling/jbang/MySQLReactiveTest.java.qute
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

//// Testcontainer needs the JDBC drivers to start the container
//// Hibernate Reactive doesn't need it
//DEPS mysql:mysql-connector-java:8.0.28
//DEPS com.mysql:mysql-connector-j:8.0.31

import javax.persistence.Entity;
import javax.persistence.Id;
Expand Down Expand Up @@ -72,7 +72,7 @@ public class {baseName} {
}

@ClassRule
public final static MySQLContainer<?> database = new MySQLContainer<>( imageName( "docker.io", "mysql", "8.0.28" ) );
public final static MySQLContainer<?> database = new MySQLContainer<>( imageName( "docker.io", "mysql", "8.0.31" ) );

private Mutiny.SessionFactory sessionFactory;

Expand Down
4 changes: 2 additions & 2 deletions tooling/jbang/ReactiveTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
//// Testcontainer needs the JDBC drivers to start the containers
//// Hibernate Reactive doesn't use them
//DEPS org.postgresql:postgresql:42.5.0
//DEPS mysql:mysql-connector-java:8.0.28
//DEPS com.mysql:mysql-connector-j:8.0.31
//DEPS org.mariadb.jdbc:mariadb-java-client:2.7.3
//

Expand Down Expand Up @@ -229,7 +229,7 @@ public String toString() {
*/
enum Database {
POSTGRESQL( () -> new PostgreSQLContainer( "postgres:14" ) ),
MYSQL( () -> new MySQLContainer( "mysql:8.0.28" ) ),
MYSQL( () -> new MySQLContainer( "mysql:8.0.31" ) ),
DB2( () -> new Db2Container( "docker.io/ibmcom/db2:11.5.7.0a" ).acceptLicense() ),
MARIADB( () -> new MariaDBContainer( "mariadb:10.9.3" ) ),
COCKROACHDB( () -> new CockroachContainer( "cockroachdb/cockroach:v21.2.4" ) );
Expand Down

0 comments on commit d112222

Please sign in to comment.