mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
### Motivation: In `DatagramChannelTests.testChannelCanReportWritableBufferedBytesWithDataLargerThanSendBuffer` we assert that there are no buffered writable bytes immediately after a flush, however in some cases tests fail as this is not true. We suspect that this is because in some situations the kernel can be slow to drain the write buffer leading to racey behavior. ### Modifications: Wait for writes to complete before asserting that the buffer is emptied. ### Result: Tests should be more deterministic. Co-authored-by: Cory Benfield <lukasa@apple.com>