Repository navigation
Share streaming cancellation tests across backends, fix backends that fail them - #3056
Merged
Merged
Conversation
… fail them Moves the cancellation tests added in #3054 to StreamingTest, so all streaming backends run them, and fixes the backends that didn't cancel properly: - HttpClient zio/zio1, Armeria zio: interrupt the request body stream when its subscription is cancelled - Armeria fs2: use fs2's Flow interop for the response body (same bug as #2963) - http4s (CE3 and CE2): interrupt streamed request bodies on cancel; CE2 now also cancels the request fiber - OkHttp monix: cancel the request body stream when the request is cancelled
… response reads cancelable
…ion-tests # Conflicts: # core/src/test/scalanative/sttp/client4/testing/streaming/StreamingTestExtensions.scala
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #3054. The cancellation tests from that PR now live in
StreamingTest, so every streaming backend runs them, on all platforms. Pekko and Akka skip them, since aFuturecan't be cancelled. The zio1 HttpClient and Armeria backends skip them too.Backends that failed, and the fixes:
InterruptibleStreamPublisher, which interrupts it.fs2-reactive-streamsdependency is removed.sendalso didn't cancel the request at all; fixed.OkHttpAsyncBackendnow cancels bodies that implementCancellableRequestBody.Known gaps: on OkHttp, multipart bodies with streamed parts aren't cancelled.
🤖 Generated with Claude Code