Skip to content

Commit

Permalink
Merge pull request #36012 from yrodiere/reactive-agroal-doc-remove-li…
Browse files Browse the repository at this point in the history
…mitation

Document that Hibernate Reactive can now work with Agroal/Flyway and test HR + Flyway
  • Loading branch information
gsmet authored Sep 20, 2023
2 parents b76dc2b + b483441 commit 6584054
Show file tree
Hide file tree
Showing 11 changed files with 41 additions and 22 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
6 changes: 0 additions & 6 deletions docs/src/main/asciidoc/hibernate-reactive.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,6 @@ it's not possible to configure multiple persistence units,
or even a single named persistence unit.
* This extension cannot be used at the same time as Hibernate ORM.
See https://github.com/quarkusio/quarkus/issues/13425.
* This extension cannot be used at the same time as JDBC/Agroal.
See https://github.com/quarkusio/quarkus/issues/33380.
+
This also means this extension cannot be used at the same time as extensions that rely on JDBC,
such as the Flyway extension.
See https://github.com/quarkusio/quarkus/issues/10716.
* Integration with the Envers extension is not supported.
* Transaction demarcation cannot be done using `jakarta.transaction.Transactional` or `QuarkusTransaction`;
if you use xref:hibernate-reactive-panache.adoc[Hibernate Reactive with Panache],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-flyway</artifactId>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-mysql</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive</artifactId>
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 6584054

Please sign in to comment.