From 1b0aecdeae4227a0434263f903002b6e00079034 Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Fri, 21 Aug 2020 13:28:57 +0100 Subject: [PATCH 1/2] Upgrade MySQL version used for tests to 8.0.21 --- .github/workflows/ci-actions.yml | 2 +- integration-tests/jpa-mysql/pom.xml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-actions.yml b/.github/workflows/ci-actions.yml index e9263e7387414..672899ddb784f 100644 --- a/.github/workflows/ci-actions.yml +++ b/.github/workflows/ci-actions.yml @@ -188,7 +188,7 @@ jobs: run: | netstat -ln sudo service mysql stop || true - docker run --rm --publish 127.0.0.1:3306:3306 --name build-mysql -e MYSQL_USER=$DB_USER -e MYSQL_PASSWORD=$DB_PASSWORD -e MYSQL_DATABASE=$DB_NAME -e MYSQL_RANDOM_ROOT_PASSWORD=true -e MYSQL_DATABASE=hibernate_orm_test -d mysql:5 --skip-ssl + docker run --rm --publish 127.0.0.1:3306:3306 --name build-mysql -e MYSQL_USER=$DB_USER -e MYSQL_PASSWORD=$DB_PASSWORD -e MYSQL_DATABASE=$DB_NAME -e MYSQL_RANDOM_ROOT_PASSWORD=true -e MYSQL_DATABASE=hibernate_orm_test -d mysql:8.0.21 --skip-ssl - name: Start DB2 # Cannot run as a service becuase the service schema does not support --privileged mode shell: bash diff --git a/integration-tests/jpa-mysql/pom.xml b/integration-tests/jpa-mysql/pom.xml index 760a47aa0babc..adb4200461af1 100644 --- a/integration-tests/jpa-mysql/pom.xml +++ b/integration-tests/jpa-mysql/pom.xml @@ -15,8 +15,8 @@ Module that contains JPA related tests running with the MySQL database - jdbc:mysql://localhost:3306/hibernate_orm_test - mysql:8.0.17 + jdbc:mysql://localhost:3306/hibernate_orm_test?allowPublicKeyRetrieval=true + mysql:8.0.21 @@ -172,7 +172,7 @@ - jdbc:mysql://localhost:3306/hibernate_orm_test + jdbc:mysql://localhost:3306/hibernate_orm_test?allowPublicKeyRetrieval=true From 0b4d3fb9ee63ebbc94f7daeb0302ce3ac8293dee Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Fri, 21 Aug 2020 13:43:31 +0100 Subject: [PATCH 2/2] Update the instructions in the README of the integration tests --- integration-tests/jpa-mysql/README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/integration-tests/jpa-mysql/README.md b/integration-tests/jpa-mysql/README.md index 9db3ed59eefa8..ecfb092a93285 100644 --- a/integration-tests/jpa-mysql/README.md +++ b/integration-tests/jpa-mysql/README.md @@ -32,7 +32,19 @@ If you have specific requirements, you can define a specific connection URL with To run the MySQL server "manually" via command line for testing, the following command line could be useful: ``` -docker run --ulimit memlock=-1:-1 -it --rm=true --memory-swappiness=0 --name quarkus_test_mysql -e MYSQL_USER=hibernate_orm_test -e MYSQL_PASSWORD=hibernate_orm_test -e MYSQL_DATABASE=hibernate_orm_test -e MYSQL_RANDOM_ROOT_PASSWORD=true -p 3306:3306 mysql:8.0.17 +docker run --ulimit memlock=-1:-1 -it --rm=true --memory-swappiness=0 --name quarkus_test_mysql -e MYSQL_USER=hibernate_orm_test -e MYSQL_PASSWORD=hibernate_orm_test -e MYSQL_DATABASE=hibernate_orm_test -e MYSQL_RANDOM_ROOT_PASSWORD=true -p 3306:3306 mysql:8.0.21 +``` + +Alternatively to docker, with podman: + +``` +podman run -it --rm=true --name quarkus_test_mysql -e MYSQL_USER=hibernate_orm_test -e MYSQL_PASSWORD=hibernate_orm_test -e MYSQL_DATABASE=hibernate_orm_test -e MYSQL_RANDOM_ROOT_PASSWORD=true -p 3306:3306 mysql:8.0.21 +``` + +To connect with a CLI client and inspect the database content: + +``` +mysql -h localhost -u hibernate_orm_test -phibernate_orm_test hibernate_orm_test --protocol tcp ``` N.B. it takes a while for MySQL to be actually booted and accepting connections.