Repository navigation
Conversation
| } | ||
| } | ||
|
|
||
| private static class CapturedSql extends RuntimeException { |
There was a problem hiding this comment.
This is a nice hack, haven't seen that before. :) Other tests seem to rather leverage the Hibernate Statistics API, but this works too.
There was a problem hiding this comment.
I thought that Statistics are more handy for counting statements. Therefore, I was looking for a way to check the generated SQL without running it on Oracle.
In the end, AI helped me find a way to capture it with StatementInspector and throw before it runs.
| <!-- Standalone dialect checks use the same Oracle database supplier as the server tests. --> | ||
| <dependency> | ||
| <groupId>org.hibernate.accessor</groupId> | ||
| <artifactId>hibernate-accessor-bytebuddy</artifactId> | ||
| <scope>test</scope> | ||
| </dependency> |
There was a problem hiding this comment.
Similar comment to here: #55437 (comment). We might want to discuss whether to introduce bytebuddy but that is a follow-up - it's ok for this PR.
Additionally, AI claims this:
Missing runtime dependency for the new unit tests. Quarkus’s Hibernate 8 BOM excludes hibernate-accessor-bytebuddy, which standalone SessionFactory bootstrap requires by default. The PR restores it in tests/base, but not model/jpa, so these tests fail during setup before exercising the dialect. Add the same test-scoped dependency to model/jpa/pom.xml.
There was a problem hiding this comment.
Similar comment to here: #55437 (comment). We might want to discuss whether to introduce bytebuddy but that is a follow-up - it's ok for this PR.
Already captured at #55633.
Additionally, AI claims this:
Well yes, but actually no - quarkus-next already has the test-scoped dependency in model/jpa from #55200. AI should know better 😄
There was a problem hiding this comment.
I wonder if we need all the new extra test coverage. We already have a dedicated ConcurrentUpsertTest.
There was a problem hiding this comment.
Cleaned-up a bit (I removed 3 test cases I considered to be redundant).
Closes: keycloak#55431 Signed-off-by: Peter Zaoral <pzaoral@redhat.com>
Closes: #55431