Closed
Description
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.