Replies: 11 comments 7 replies
-
/cc @evanchooly |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
bugquarkusjunit5native.zip |
Beta Was this translation helpful? Give feedback.
-
FYI, adding the H2DatabaseTestResource annotation to the native test didn't help either:
Thought it might have been because ProjectResourceTestIT didn't inherit the annotation from the ProjectResourceTest... |
Beta Was this translation helpful? Give feedback.
-
Also tried the simplest test:
with
which gives the same null pointer exception. |
Beta Was this translation helpful? Give feedback.
-
@kenyee @geoand created a PR #23146 to fix the issue. It will be part of the upcoming 2.7.0.Final. |
Beta Was this translation helpful? Give feedback.
-
Nice one liner :-) |
Beta Was this translation helpful? Give feedback.
-
@gsmet tested the above repro app with 2.7.0.Final and 2.7.1.Final and the error is still there.
2.7.1. also has an OOM error building the jar unless you add this to gradle.properties to adding a larger heap might be a good idea to default in gradle.properties:
|
Beta Was this translation helpful? Give feedback.
-
@geoand the reproducer is attached above...just change the Quarkus version to the latest. |
Beta Was this translation helpful? Give feedback.
-
🤔 I grabbed the same file, put it into a separate directory, changed the gradle.properties to use 2.7.1.Final and added the JVM args and ran "./gradlew check" and still got the error.
Also tried a ./gradlew clean first, but that shouldn't matter because the zip didn't include the build folder. This is what I'm using for the JVM
./gradlew dependencies shows quarkus 2.7.1:
|
Beta Was this translation helpful? Give feedback.
-
For anyone else who might run into an error with integration tests, run gradle/maven with debug logging and you might see something like this:
I had set up and the integration test uses the prod environment settings. but this manifested in the "./gradlew testNative" output as an error like this:
because of the parsing of the error log stacktrace which doesn't take into account the TestEventLogger messages:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This test runs fine in a normal test, but fails when run as a @NativeImageTest. It's in Kotlin, but it shouldn't matter.
The normal JVM test it inherits from is:
and h2 is pulled in by doing this:
I couldn't find anything in the issues or discussion about this....how do folks do integration tests w/ H2 in Native Integration Tests?
Here's the rest of the stack trace:
Beta Was this translation helpful? Give feedback.
All reactions