Closed BrennanConroy closed 6 years ago
The motivation behind this was a flaky test that started appearing in some PRs because of a race between the client closing the connection when it received all the bytes and the 0-byte write being sent.
C# tests right? I believe its the only client that doesn't buffer the websocket frames.
I'm fine with making more stuff internal
so it can be accessed directly too, so you don't have to dive through layers of mocking.
Actually yeah, it's not that hard. The main method (SendAsync(this WebSocket ws, ROS<byte>...)
) is public on an internal type already. A little IVT here, a mock WebSocket there and you should be able to test it.
:up: 📅 with test
The motivation behind this was a flaky test that started appearing in some PRs because of a race between the client closing the connection when it received all the bytes and the 0-byte write being sent.
Now we write one segment behind where we've read up to, to allow writing a non 0-byte end of message frame.