Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

AsyncChannel: Provide throwing finish method on test stream #2493

Merged
merged 1 commit into from
Aug 7, 2023

Conversation

FranzBusch
Copy link
Member

Motivation

We recently provided testing utilities for the NIOAsyncChannelInboundStream. On thing that was missing is a way to finish the stream with an error.

Modification

This PR provides a finish() method that takes an error which is thrown from the inbound stream.

Result

Better way to test code relying on the AsyncChannel work.

@FranzBusch FranzBusch added the 🆕 semver/minor Adds new public API. label Aug 7, 2023
@FranzBusch FranzBusch requested a review from glbrntt August 7, 2023 10:46
# Motivation
We recently provided testing utilities for the `NIOAsyncChannelInboundStream`. On thing that was missing is a way to finish the stream with an error.

# Modification
This PR provides a `finish()` method that takes an error which is thrown from the inbound stream.

# Result
Better way to test code relying on the AsyncChannel work.
@FranzBusch FranzBusch requested a review from glbrntt August 7, 2023 11:20
@FranzBusch FranzBusch force-pushed the fb-inbound-stream-testing-throwing branch from 44527c1 to e440c69 Compare August 7, 2023 11:20
@Lukasa Lukasa merged commit 28eb2ac into apple:main Aug 7, 2023
@FranzBusch FranzBusch deleted the fb-inbound-stream-testing-throwing branch August 7, 2023 13:27
1proprogrammerchant added a commit to 1proprogrammerchant/swift-nio that referenced this pull request Aug 8, 2023
AsyncChannel: Provide throwing finish method on test stream (apple#2493)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
🆕 semver/minor Adds new public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants