You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the @RunOnVertxContext(duplicateContext = true) annotation in my tests since the tests calls a Hibernate reactive data source. This works when I put the annotation on each method, but it doesn't work when I put the annotation on the class.
Looking at RunOnVertxContextTestMethodInvoker, it appears that we're looking for the annotation on the class and method in supportsMethod but we only look at the method annotation in shouldContextBeDuplicated.
Expected behavior
Running a test on a Hibernate reactive repository with a @RunOnVertxContext(duplicateContext = true) annotation on the test class should succeed.
Actual behavior
Running the test yields the following message:
Can't get the context safety flag: the current context is not a duplicated context
openjdk version "17" 2021-09-14 LTS OpenJDK Runtime Environment Corretto-17.0.0.35.1 (build 17+35-LTS) OpenJDK 64-Bit Server VM Corretto-17.0.0.35.1 (build 17+35-LTS, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.11.2.Final
Build tool (ie. output of mvnw --version or gradlew --version)
Maven (Version 3.8.1)
Additional information
Putting the annotation on each method is a valid workaround so this is not a blocker. The current behavior looks a bit inconsistent (compared to TestReactiveTransaction)
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm using the
@RunOnVertxContext(duplicateContext = true)
annotation in my tests since the tests calls a Hibernate reactive data source. This works when I put the annotation on each method, but it doesn't work when I put the annotation on the class.Looking at
RunOnVertxContextTestMethodInvoker
, it appears that we're looking for the annotation on the class and method insupportsMethod
but we only look at the method annotation inshouldContextBeDuplicated
.Expected behavior
Running a test on a Hibernate reactive repository with a
@RunOnVertxContext(duplicateContext = true)
annotation on the test class should succeed.Actual behavior
Running the test yields the following message:
How to Reproduce?
Where TestRepository has the following:
Output of
uname -a
orver
Microsoft Windows [Version 10.0.19043.1826]
Output of
java -version
openjdk version "17" 2021-09-14 LTS OpenJDK Runtime Environment Corretto-17.0.0.35.1 (build 17+35-LTS) OpenJDK 64-Bit Server VM Corretto-17.0.0.35.1 (build 17+35-LTS, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.11.2.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Maven (Version 3.8.1)
Additional information
Putting the annotation on each method is a valid workaround so this is not a blocker. The current behavior looks a bit inconsistent (compared to TestReactiveTransaction)
The text was updated successfully, but these errors were encountered: