Skip to content
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

Investigate io.quarkus.resteasy.reactive.server.test.stream.StreamTestCase#testClientStreaming #16227

Closed
cescoffier opened this issue Apr 3, 2021 · 10 comments · Fixed by #16438
Labels
area/rest kind/bug Something isn't working
Milestone

Comments

@cescoffier
Copy link
Member

cescoffier commented Apr 3, 2021

io.quarkus.resteasy.reactive.server.test.stream.StreamTestCase#testClientStreaming has been disabled in the Vert.x 4 branches due to some random failure on CI.

Also:
io.quarkus.resteasy.reactive.jsonb.deployment.test.sse.SseTestCase#testMultiFromMulti

@cescoffier cescoffier added kind/bug Something isn't working area/rest labels Apr 3, 2021
@cescoffier cescoffier added this to the 2.x milestone Apr 3, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Apr 3, 2021

/cc @FroMage, @geoand, @stuartwdouglas

cescoffier added a commit to cescoffier/quarkus that referenced this issue Apr 3, 2021
cescoffier added a commit to cescoffier/quarkus that referenced this issue Apr 5, 2021
cescoffier added a commit to cescoffier/quarkus that referenced this issue Apr 6, 2021
cescoffier added a commit to cescoffier/quarkus that referenced this issue Apr 6, 2021
@famod
Copy link
Member

famod commented Apr 6, 2021

FWIW, we have seen this test class failing randomly on main as well: #15756

cescoffier added a commit to cescoffier/quarkus that referenced this issue Apr 7, 2021
cescoffier added a commit to cescoffier/quarkus that referenced this issue Apr 7, 2021
cescoffier added a commit to cescoffier/quarkus that referenced this issue Apr 7, 2021
@geoand
Copy link
Contributor

geoand commented Apr 12, 2021

I was periodically able to reproduce this locally but I still don't know what the cause is.

A packet capture seems to show that the server returns the proper data in all cases so judging from that it looks like a client issue.

@FroMage
Copy link
Member

FroMage commented Apr 12, 2021

Huh, that could be very helpful, narrows it down quite a lot !

@geoand
Copy link
Contributor

geoand commented Apr 12, 2021

I'm looking at MultiInvoker and I am wondering whether the MultiRequest class you added is still needed. Asking because it looks like the bug you mention seems to be fixed in Mutiny.
So perhaps the code can be simplified?

@FroMage
Copy link
Member

FroMage commented Apr 12, 2021

Probably yes. And this was tested anyway. But we disabled so many tests, it's hard to be sure it's still enabled…

@geoand
Copy link
Contributor

geoand commented Apr 12, 2021

It seems like in the cases of failure,

is getting called before

The thing is that I don't think we even need to have

        connection.closeHandler(v -> {
            multiRequest.emitter.complete();
        });

as

        vertxClientResponse.endHandler(v -> {
            multiRequest.emitter.complete();
        });

will always be called anyway (and it does seem to always be called after the emitting is done).

WDYT @FroMage ?

@geoand
Copy link
Contributor

geoand commented Apr 12, 2021

FWIW, I ran thousands of tests with the above fix in place and they all passed

@geoand
Copy link
Contributor

geoand commented Apr 12, 2021

The same thing exact also applies to SseEventSourceImpl. I will open a PR

@geoand
Copy link
Contributor

geoand commented Apr 12, 2021

Here it is: #16438

gastaldi added a commit that referenced this issue Apr 13, 2021
Fix race condition on reactive client with streaming and SSE responses
@gsmet gsmet modified the milestones: 2.x, 1.13.2.Final Apr 13, 2021
gsmet pushed a commit to gsmet/quarkus that referenced this issue Apr 13, 2021
luca-digrazia pushed a commit to luca-digrazia/DatasetCommitsDiffSearch that referenced this issue Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/rest kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants