-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
End Vert.x response before propagating mapped exception in VertxBlockingoutput #21842
Conversation
@geoand Took more time than expected because I was trying to figure out how to force the error using tests. I failed, if you think a test is a must, do you have an idea how to force the behavior using a test? |
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.
I believe we've had a few of similar fixes which can be hard to reproduce with tests
Let's wait for @stuartwdouglas 's blessing before merging this, please. |
Failing Jobs - Building 8bea56c
Full information is available in the Build summary check run. Failures⚙️ Gradle Tests - JDK 11 Windows #- Failing: integration-tests/gradle
📦 integration-tests/gradle✖
|
@sberyozkin @geoand To reproduce this one we need to somehow force an error on the write stream so that the exception is set here Line 34 in 8bea56c
Then, the We should be able to check by looking if headers were written, or if handlers registered via |
I am ok with skipping a test for this one. We do have a couple of similar tests for the read side such as https://github.com/stuartwdouglas/quarkus/blob/04aa95308cc3296ec89871932cfae101daf9d46a/extensions/resteasy-classic/resteasy/deployment/src/test/java/io/quarkus/resteasy/test/IncompletePostTestCase.java#L38 Basically if you want to test this you need to manually send a HTTP request over a socket, then close the socket after a delay without reading, and also write a large amount of data in the test. Even then I think it will be hard to get a test that passes reliably though. |
@stuartwdouglas Yeah .. I noticed there are some tests there doing something similar you are suggesting, but I failed to adapt it to my use case :(. But I was not sure what I was doing was the right path, now that you suggested I'll try more. |
Relates to: #21841