Skip to content

Conversation

FranzBusch
Copy link
Member

Motivation

When using the NIOAsyncChannel to build higher level abstractions it is hard to test right now since one cannot drive the NIOAsyncChannelInputStream nor the NIOAsyncChannelOutputWriter.

Modification

This PR adds new factory methods to both of those types which allow to either drive the input stream or record the outputs written to the output writer.

Result

One can now successfully test their code written on top of the input stream and output writer.

@FranzBusch FranzBusch added the 🆕 semver/minor Adds new public API. label Jul 31, 2023
@FranzBusch FranzBusch force-pushed the fb-testing-interfaces-async-channel branch from 777d218 to 0bedccc Compare July 31, 2023 09:29
Copy link
Contributor

@gjcairo gjcairo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one small comment

@FranzBusch FranzBusch force-pushed the fb-testing-interfaces-async-channel branch from 0bedccc to 1ff97ed Compare July 31, 2023 10:05
…nel`

# Motivation
When using the `NIOAsyncChannel` to build higher level abstractions it is hard to test right now since one cannot drive the `NIOAsyncChannelInputStream` nor the `NIOAsyncChannelOutputWriter`.

# Modification
This PR adds new factory methods to both of those types which allow to either drive the input stream or record the outputs written to the output writer.

# Result
One can now successfully test their code written on top of the input stream and output writer.
@FranzBusch FranzBusch force-pushed the fb-testing-interfaces-async-channel branch from 1ff97ed to 6eb7c94 Compare July 31, 2023 10:07
@FranzBusch FranzBusch enabled auto-merge (squash) July 31, 2023 10:07
@FranzBusch FranzBusch merged commit fd30761 into apple:main Jul 31, 2023
@FranzBusch FranzBusch deleted the fb-testing-interfaces-async-channel branch July 31, 2023 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🆕 semver/minor Adds new public API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants