Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 0 additions & 105 deletions integration-tests/hibernate-reactive-mysql-agroal-flyway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
<name>Quarkus - Integration Tests - Hibernate Reactive - MySQL - With Agroal and Flyway</name>
<description>Hibernate Reactive related tests running with the MySQL database and also using Agroal and Flyway</description>

<properties>
<reactive-mysql.url>vertx-reactive:mysql://localhost:3308/hibernate_orm_test?allowPublicKeyRetrieval=true</reactive-mysql.url>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised that we're losing the allowPublicKeyRetrieval and not reintroducing it anywhere... was it pointless?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There definitely were some bits of xml that as I deleted them, I thought "and something here will break" ... but nothing did. So I guess either maybe some tests got removed over time but their config hung around, or we want to cover those scenarios but don't have tests explicitly checking for them.

Not sure how best to handle without detailed analysis which I lack both appetite and expertise for!

<mysql.jdbc.url>jdbc:mysql://localhost:3308/hibernate_orm_test</mysql.jdbc.url>
</properties>

<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down Expand Up @@ -206,106 +201,6 @@
</plugins>
</build>
</profile>

<profile>
<id>docker-mysql</id>
<activation>
<property>
<name>start-containers</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<images>
<image>
<name>healthcheck-${mysql.image}</name>
<alias>quarkus-test-mysql</alias>
<build>
<from>${mysql.image}</from>
<healthCheck>
<!-- The exact values for these aren't very important, but it is important they are there -->
<interval>5s</interval>
<timeout>3s</timeout>
<startPeriod>5s</startPeriod>
<retries>5</retries>
<!-- We could also use /usr/local/bin/healthcheck.sh but it seemed complicated to get the right level.
Note that mysqladmin ping returns 0 even if the password is wrong so we don't need to pass in a password, but it makes the logs cleaner-->
<cmd>
<shell>mysqladmin ping -h localhost -u hibernate_orm_test -phibernate_orm_test || exit 1 </shell>
</cmd>
</healthCheck>
</build>
<run>
<ports>
<port>3308:3306</port>
</ports>
<env>
<MYSQL_USER>hibernate_orm_test</MYSQL_USER>
<MYSQL_PASSWORD>hibernate_orm_test</MYSQL_PASSWORD>
<MYSQL_DATABASE>hibernate_orm_test</MYSQL_DATABASE>
<MYSQL_RANDOM_ROOT_PASSWORD>true</MYSQL_RANDOM_ROOT_PASSWORD>
</env>
<log>
<prefix>MySQL:</prefix>
<date>default</date>
<color>cyan</color>
</log>
<!-- Speed things up a bit by not actually flushing writes to disk -->
<tmpfs>/var/lib/mysql</tmpfs>
Comment on lines -257 to -258
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as for the MariaDB PR:

#51090 (comment)

<!-- good docs found at: https://dmp.fabric8.io/#start-wait -->
<wait>
<time>20000</time>
<healthy>true</healthy>
</wait>
</run>
</image>
</images>
<!--Stops all mysql images currently running, not just those we just started.
Useful to stop processes still running from a previously failed integration test run -->
<allContainers>true</allContainers>
</configuration>
<executions>
<execution>
<id>docker-start</id>
<phase>compile</phase>
<goals>
<goal>stop</goal>
<goal>build</goal>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>docker-stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>docker-prune</id>
<phase>generate-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${docker-prune.location}</executable>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>


Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Reactive+JDBC datasource config
quarkus.datasource.db-kind=mysql
quarkus.datasource.username=hibernate_orm_test
quarkus.datasource.password=hibernate_orm_test
quarkus.datasource.reactive.url=${reactive-mysql.url}
quarkus.datasource.jdbc.url=${mysql.jdbc.url}
quarkus.datasource.jdbc.max-size=1

# Hibernate config
Expand Down
104 changes: 0 additions & 104 deletions integration-tests/hibernate-reactive-mysql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
<name>Quarkus - Integration Tests - Hibernate Reactive - MySQL</name>
<description>Hibernate Reactive related tests running with the MySQL database</description>

<properties>
<reactive-mysql.url>vertx-reactive:mysql://localhost:3308/hibernate_orm_test?allowPublicKeyRetrieval=true</reactive-mysql.url>
</properties>

<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
Expand Down Expand Up @@ -152,106 +148,6 @@
</plugins>
</build>
</profile>

<profile>
<id>docker-mysql</id>
<activation>
<property>
<name>start-containers</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<images>
<image>
<name>healthcheck-${mysql.image}</name>
<alias>quarkus-test-mysql</alias>
<build>
<from>${mysql.image}</from>
<healthCheck>
<!-- The exact values for these aren't very important, but it is important they are there -->
<interval>5s</interval>
<timeout>3s</timeout>
<startPeriod>5s</startPeriod>
<retries>5</retries>
<!-- We could also use /usr/local/bin/healthcheck.sh but it seemed complicated to get the right level.
Note that mysqladmin ping returns 0 even if the password is wrong so we don't need to pass in a password, but it makes the logs cleaner-->
<cmd>
<shell>mysqladmin ping -h localhost -u hibernate_orm_test -phibernate_orm_test || exit 1 </shell>
</cmd>
</healthCheck>
</build>
<run>
<ports>
<port>3308:3306</port>
</ports>
<env>
<MYSQL_USER>hibernate_orm_test</MYSQL_USER>
<MYSQL_PASSWORD>hibernate_orm_test</MYSQL_PASSWORD>
<MYSQL_DATABASE>hibernate_orm_test</MYSQL_DATABASE>
<MYSQL_RANDOM_ROOT_PASSWORD>true</MYSQL_RANDOM_ROOT_PASSWORD>
</env>
<log>
<prefix>MySQL:</prefix>
<date>default</date>
<color>cyan</color>
</log>
<!-- Speed things up a bit by not actually flushing writes to disk -->
<tmpfs>/var/lib/mysql</tmpfs>
<!-- good docs found at: https://dmp.fabric8.io/#start-wait -->
<wait>
<time>20000</time>
<healthy>true</healthy>
</wait>
</run>
</image>
</images>
<!--Stops all mysql images currently running, not just those we just started.
Useful to stop processes still running from a previously failed integration test run -->
<allContainers>true</allContainers>
</configuration>
<executions>
<execution>
<id>docker-start</id>
<phase>compile</phase>
<goals>
<goal>stop</goal>
<goal>build</goal>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>docker-stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>docker-prune</id>
<phase>generate-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${docker-prune.location}</executable>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>


Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
quarkus.datasource.db-kind=mysql
quarkus.datasource.username=hibernate_orm_test
quarkus.datasource.password=hibernate_orm_test

# Hibernate config
#quarkus.hibernate-orm.log.sql=true
quarkus.hibernate-orm.schema-management.strategy=drop-and-create

# Reactive config
quarkus.datasource.reactive=true
quarkus.datasource.reactive.url=${reactive-mysql.url}
6 changes: 3 additions & 3 deletions integration-tests/jpa-mysql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

By default, the tests of this module are disabled.

To run the tests in a standard JVM with MySQL started as a Docker container, you can run the following command:
To run the tests in a standard JVM with MySQL started as a Dev Service, you can run the following command:

```
mvn clean install -Dtest-containers -Dstart-containers
Expand All @@ -19,9 +19,9 @@ Additionally, you can generate a native image and run the tests for this native
mvn clean install -Dtest-containers -Dstart-containers -Dnative
```

If you don't want to run MySQL as a Docker container, you can start your own MySQLDB server. It needs to listen on the default port and have a database called `hibernate_orm_test` accessible to the user `hibernate_orm_test` with the password `hibernate_orm_test`.
If you don't want to run MySQL as a Dev Service, you can start your own MySQLDB server. It needs to listen on the default port and have a database called `hibernate_orm_test` accessible to the user `hibernate_orm_test` with the password `hibernate_orm_test`.

You can then run the tests as follows (either with `-Dnative` or not):
You can then run the tests as follows (either with `-Dnative` or not), with extra configuration for the connection url:

```
mvn clean install -Dtest-containers
Expand Down
Loading
Loading