Add unit tests for `NWWaitingHandler`
dnadoba opened this issue · comments
When we added NWWaitingHandler
in #588 we didn’t add a unit test for the NWWaitingHandler
. This is because we need to make an enhancement to NIOTransportServices
to make the WaitingForConnectivity
event initialiser public. This is tracked as a separate issue in apple/swift-nio-transport-services#147 and must be resolved first.
The unit test can be implemented by using an EmbeddedChannel
and sending an NIOTSNetworkEvents.WaitingForConnectivity
through fireUserInboundEventTriggered(_:)
. An example usage of EmbeddedChannel
and fireUserInboundEventTriggered(_:)
can be found here:
This should be straight forward and a good first starter issue. If you have more questions please don't hesitate to ask here.
Hi, @dnadoba.
I'd like to address this issue.
This is tracked as a separate issue in apple/swift-nio-transport-services#147 and must be resolved first.
Have this been resolved already? If so, I'd like to work on this issue next week.
Yes, the initialisers are now public and you can address the issue. PRs welcome :)