-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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 duplicated context for reactive routes and @ConsumeEvent #23669
Add support for duplicated context for reactive routes and @ConsumeEvent #23669
Conversation
cescoffier
commented
Feb 14, 2022
- Verify that reactive routes are invoked on duplicated contexts
- Ensure that event consumers (@ConsumeEvent) are invoked from unshared duplicated context.
|
||
private void process(RoutingContext ctx) { | ||
Context context = Vertx.currentContext(); | ||
Assertions.assertFalse(context instanceof EventLoopContext); |
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.
Would context.isOnEventLoopThread()
still return true
?
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.
in the case of blocking... yes.
I know it's confusing. It's because of executeBlocking
which keeps your event loop context.
I've opened a PR on Vert.x to get a better way to check if we are on a duplicated context.
extensions/vertx/deployment/src/test/java/io/quarkus/vertx/DuplicatedContextTest.java
Outdated
Show resolved
Hide resolved
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.
Looks good otherwise.
347adac
to
cd63fa6
Compare
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building cd63fa6
Full information is available in the Build summary check run. Failures⚙️ Gradle Tests - JDK 11 Windows #- Failing: integration-tests/gradle
📦 integration-tests/gradle✖
⚙️ JVM Tests - JDK 11 Windows #- Failing: extensions/reactive-routes/deployment
! Skipped: extensions/agroal/deployment extensions/elytron-security-jdbc/deployment extensions/flyway/deployment and 164 more 📦 extensions/reactive-routes/deployment✖
|
cd63fa6
to
f3dbe95
Compare
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building f3dbe95
Failures⚙️ Initial JDK 11 Build #- Failing: extensions/reactive-routes/deployment
! Skipped: devtools/bom-descriptor-json docs extensions/agroal/deployment and 174 more 📦 extensions/reactive-routes/deployment✖ |
f3dbe95
to
a9cb168
Compare
This workflow status is outdated as a new workflow run has been triggered. Failing Jobs - Building a9cb168
Full information is available in the Build summary check run. Failures⚙️ Gradle Tests - JDK 11 Windows #- Failing: integration-tests/gradle
📦 integration-tests/gradle✖
⚙️ JVM Tests - JDK 11 #- Failing: extensions/reactive-routes/deployment
! Skipped: extensions/agroal/deployment extensions/elytron-security-jdbc/deployment extensions/flyway/deployment and 164 more 📦 extensions/reactive-routes/deployment✖
⚙️ JVM Tests - JDK 11 Windows #- Failing: extensions/reactive-routes/deployment
! Skipped: extensions/agroal/deployment extensions/elytron-security-jdbc/deployment extensions/flyway/deployment and 164 more 📦 extensions/reactive-routes/deployment✖
⚙️ JVM Tests - JDK 17 #- Failing: extensions/reactive-routes/deployment
! Skipped: extensions/agroal/deployment extensions/elytron-security-jdbc/deployment extensions/flyway/deployment and 164 more 📦 extensions/reactive-routes/deployment✖
|
The |
Yes, that's weird. Something else is happening. I will have a look (I can't reproduce it locally of course). The for-loop is not necessary for the blocking test, so I may just simplify it. |
…duplicated context.
a9cb168
to
1017a9a
Compare