Skip to content

Commit

Permalink
Test Hibernate Reactive with Flyway
Browse files Browse the repository at this point in the history
  • Loading branch information
yrodiere committed Sep 19, 2023
1 parent 4de4196 commit b483441
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/native-tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
{
"category": "Data7",
"timeout": 85,
"test-modules": "reactive-oracle-client, reactive-mysql-client, reactive-db2-client, hibernate-reactive-db2, hibernate-reactive-mysql, hibernate-reactive-mysql-agroal, hibernate-reactive-panache, hibernate-reactive-panache-kotlin",
"test-modules": "reactive-oracle-client, reactive-mysql-client, reactive-db2-client, hibernate-reactive-db2, hibernate-reactive-mysql, hibernate-reactive-mysql-agroal-flyway, hibernate-reactive-panache, hibernate-reactive-panache-kotlin",
"os-name": "ubuntu-latest"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>quarkus-integration-test-hibernate-reactive-mysql-agroal</artifactId>
<name>Quarkus - Integration Tests - Hibernate Reactive - MySQL</name>
<description>Hibernate Reactive related tests running with the MySQL database</description>
<artifactId>quarkus-integration-test-hibernate-reactive-mysql-agroal-flyway</artifactId>
<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:3306/hibernate_orm_test</reactive-mysql.url>
Expand Down Expand Up @@ -39,6 +39,14 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive-jsonb</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-flyway</artifactId>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-mysql</artifactId>
</dependency>

<!-- test dependencies -->
<dependency>
Expand Down Expand Up @@ -118,6 +126,19 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-flyway-deployment</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
# Reactive datasource config
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.database.generation=drop-and-create

# Reactive config
quarkus.datasource.reactive=true
quarkus.datasource.reactive.url=${reactive-mysql.url}

# Blocking datasource config
quarkus.datasource.blocking.db-kind=mysql
quarkus.datasource.blocking.username=hibernate_orm_test
quarkus.datasource.blocking.password=hibernate_orm_test
quarkus.datasource.blocking.jdbc.url=${mysql.jdbc.url}
quarkus.datasource.blocking.jdbc=true
quarkus.datasource.blocking.jdbc.max-size=1

# Hibernate config
#quarkus.hibernate-orm.log.sql=true
# We'll use Flyway
quarkus.hibernate-orm.database.generation=none

# Check that one can use Flyway alongside Hibernate Reactive
quarkus.flyway.blocking.migrate-at-start=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
create table Pig (
id integer not null,
name varchar(255),
primary key (id)
) engine=InnoDB;
2 changes: 1 addition & 1 deletion integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
<module>hibernate-orm-panache-kotlin</module>
<module>hibernate-reactive-db2</module>
<module>hibernate-reactive-mysql</module>
<module>hibernate-reactive-mysql-agroal</module>
<module>hibernate-reactive-mysql-agroal-flyway</module>
<module>hibernate-reactive-postgresql</module>
<module>hibernate-reactive-panache</module>
<module>hibernate-reactive-panache-kotlin</module>
Expand Down

0 comments on commit b483441

Please sign in to comment.