Skip to content

Commit

Permalink
Merge pull request #25878 from holly-cummins/holly-m1-mysql-tests-fab…
Browse files Browse the repository at this point in the history
…ric8
  • Loading branch information
gastaldi authored May 31, 2022
2 parents 21042ba + 094806e commit ba1107f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
6 changes: 6 additions & 0 deletions build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1241,6 +1241,12 @@
<properties>
<!-- Podman compatibility. Currently, mac file systems based on Plan 9 does not support SELinux labeling z and Z should not be used. When they transition to use virtiofsd, it should support SELinux labeling, and then we can use it for better container separation on the Mac.-->
<volume.access.modifier></volume.access.modifier>

<!-- See https://stackoverflow.com/questions/65456814/docker-apple-silicon-m1-preview-mysql-no-matching-manifest-for-linux-arm64-v8
and https://www.emmanuelgautier.com/blog/mysql-docker-arm-m1
This hopefully should be temporary -->
<mysql.image>arm64v8/mysql:8-oracle</mysql.image>

</properties>
</profile>

Expand Down
2 changes: 1 addition & 1 deletion extensions/reactive-oracle-client/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
<!-- good docs found at: http://dmp.fabric8.io/#build-healthcheck -->
<!-- Unfortunately booting this is slow, needs to set a generous timeout: -->
<time>60000</time>
<!-- leversge the healthcheck in the image we use -->
<!-- leverage the healthcheck in the image we use -->
<healthy>yes</healthy>
</wait>
</run>
Expand Down
26 changes: 20 additions & 6 deletions integration-tests/jpa-mysql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,24 @@
<configuration>
<images>
<image>
<name>${mysql.image}</name>
<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>3306:3306</port>
Expand All @@ -182,13 +198,10 @@
</log>
<!-- Speed things up a bit by not actually flushing writes to disk -->
<tmpfs>/var/lib/mysql</tmpfs>
<!-- good docs found at: http://dmp.fabric8.io/#start-wait -->
<wait>
<!-- good docs found at: http://dmp.fabric8.io/#start-wait -->
<time>20000</time>
<!-- wait until MySQL is actually up by checking if mysqladmin can ping the server with specified username/password -->
<exec>
<postStart>mysqladmin ping -h localhost -u hibernate_orm_test -phibernate_orm_test</postStart>
</exec>
<healthy>true</healthy>
</wait>
</run>
</image>
Expand All @@ -203,6 +216,7 @@
<phase>compile</phase>
<goals>
<goal>stop</goal>
<goal>build</goal>
<goal>start</goal>
</goals>
</execution>
Expand Down

0 comments on commit ba1107f

Please sign in to comment.