Skip to content

Conversation

@DavideD
Copy link
Member

@DavideD DavideD commented Apr 28, 2025

Fix #2129

DavideD added 2 commits April 28, 2025 13:09
We use it to test the dialect selection at start up
This way we can reuse the method even if the tests don't extend
BaseReactiveTest

@ParameterizedTest(name = "Test {0} with " + DIALECT)
@MethodSource("explicitVersionProperties")
public void testExplicitVersionWithDialect(String display, Properties dbProperties) {

Check notice

Code scanning / CodeQL

Useless parameter Note test

The parameter 'display' is never used.

@ParameterizedTest(name = "Test {0} with " + JAKARTA_HBM2DDL_DB_NAME)
@MethodSource("explicitVersionProperties")
public void testExplicitVersionWithJakartaDbName(String display, Properties dbProperties) {

Check notice

Code scanning / CodeQL

Useless parameter Note test

The parameter 'display' is never used.
@DavideD DavideD force-pushed the 2129-Offline-startup branch 3 times, most recently from e220976 to f4d2f55 Compare April 28, 2025 12:22
@DavideD DavideD requested a review from yrodiere April 28, 2025 12:30
DavideD added 2 commits April 28, 2025 14:31
I'm not sure what's the purpose of this test, and why
it was working before.

But, it doesn't work anymore with the fix for hibernate#2129 because
some properties are missing and we are not setting the right
credentials.

I think it was one of first tests we introduced when we have created
the project and obsolete now.
This feature is useful in particular for applications that start up before the DB becomes accessible.
It can also be useful for Quarkus, where (part of) startup happens at build time.

This achieved by setting the property:

```
hibernate.boot.allow_jdbc_metadata_access = false
```
@DavideD DavideD force-pushed the 2129-Offline-startup branch from f4d2f55 to 403c431 Compare April 28, 2025 12:31
Hibernate Reactive should be able to start
even if there's no database when
`hibernate.boot.allow_jdbc_metadata_access = false`.
@DavideD DavideD force-pushed the 2129-Offline-startup branch from 403c431 to 18387d6 Compare April 28, 2025 12:42
@DavideD DavideD merged commit 4782948 into hibernate:main Apr 28, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow (and test) offline startup + on-demand DB version checks

1 participant