-
Notifications
You must be signed in to change notification settings - Fork 92
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
Add support for H2 #1252
Add support for H2 #1252
Conversation
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.
Nice.
We still need to move this in a separate optional dependency. So that it can be included the same way we add only the necessary Vertx SQL drivers
hibernate-reactive-core/src/test/java/org/hibernate/reactive/containers/H2Database.java
Show resolved
Hide resolved
hibernate-reactive-core/src/test/java/org/hibernate/reactive/containers/H2Database.java
Outdated
Show resolved
Hide resolved
hibernate-reactive-core/src/test/java/org/hibernate/reactive/containers/H2Database.java
Outdated
Show resolved
Hide resolved
@@ -33,6 +36,9 @@ | |||
|
|||
private static final String DEFAULT_DB = "hreactDB"; | |||
|
|||
@Rule | |||
public DatabaseSelectionRule rule = DatabaseSelectionRule.skipTestsFor( H2 ); |
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.
This test should also work for H2. I think it will if you implement createJdbcUrl
correctly
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.
Our Vertx supported DB's all use the DefaultSqlClientPoolConfiguration.connectOptions()
method. SqlConnectOptions
requires a host and port, so for H2, it would mean coding around these checks.
In H2SqlClientPool
I'm using a local SqlConnectOptions
object, but I don't need to. Since this class is isolated and uses vertx-jdbc-client JDBCConnectOptions
anyway I think it might be better to not use SqlConnectOptions for H2.
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.
Since this test uses DefaultSqlClientPool
and DefaultSqlClientPoolConfiguration().connectOptions( uri )
which are specific to non-H2 Db's I think it still makes sense to skip H2 dbtype
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.
We can update the test so that it works for both, though. Anyway, ok, let's fix everything else first
hibernate-reactive-core/src/test/java/org/hibernate/reactive/WrongCredentialsTest.java
Show resolved
Hide resolved
hibernate-reactive-core/src/main/java/org/hibernate/reactive/pool/impl/H2SqlClientPool.java
Outdated
Show resolved
Hide resolved
hibernate-reactive-core/src/test/java/org/hibernate/reactive/MutinyExceptionsTest.java
Show resolved
Hide resolved
640613e
to
fe8ede8
Compare
...ive-core/src/main/java/org/hibernate/reactive/pool/impl/ReactiveConnectionPoolInitiator.java
Outdated
Show resolved
Hide resolved
Nice to see progress on this :) thanks @blafond ! |
502efa7
to
0c63496
Compare
We are putting this on hold because the build fails randomly with |
I'm going to send a new PR |
Fixes #929
Added custom H2 client pool and configuration changes to test against an H2 database