-
Notifications
You must be signed in to change notification settings - Fork 3k
Switch MySQL tests to use dev services #51092
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
holly-cummins
wants to merge
1
commit into
quarkusio:main
Choose a base branch
from
holly-cummins:convert-mysql-tests-to-devservices
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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> | ||
| <mysql.jdbc.url>jdbc:mysql://localhost:3308/hibernate_orm_test</mysql.jdbc.url> | ||
| </properties> | ||
|
|
||
| <dependencies> | ||
| <dependency> | ||
| <groupId>io.quarkus</groupId> | ||
|
|
@@ -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
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same comment as for the MariaDB PR: |
||
| <!-- 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> | ||
|
|
||
|
|
||
|
|
||
4 changes: 0 additions & 4 deletions
4
...on-tests/hibernate-reactive-mysql-agroal-flyway/src/main/resources/application.properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
integration-tests/hibernate-reactive-mysql/src/main/resources/application.properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
allowPublicKeyRetrievaland not reintroducing it anywhere... was it pointless?There was a problem hiding this comment.
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!