apple / swift-nio-transport-services

Extensions for SwiftNIO to support Apple platforms as first-class citizens.
https://swiftpackageindex.com/apple/swift-nio-transport-services/main/documentation/niotransportservices
Apache License 2.0
282 stars 71 forks source link

Make tests less flaky #194

Closed FranzBusch closed 9 months ago

FranzBusch commented 9 months ago

Motivation

After the recent changes in NIO where we introduced the executeThenClose method on the NIOAsyncChannel our tests here became flaky since we were waiting for something to happen but potentially closed the client channels before we wrote out the data.

Modification

This PR makes sure we are awaiting for the event in the executeThenClose scope; hence, making sure we are not closing the client channels too early.

Result

Less flakey tests.