braverhealth / phoenix-socket-dart

Cross-platform and stream-based implementation of Phoenix Sockets
https://pub.dev/packages/phoenix_socket
BSD 3-Clause "New" or "Revised" License
73 stars 37 forks source link

add tests around connectivity issues #74

Closed matehat closed 4 months ago

matehat commented 4 months ago

Test that the following scenarios work:

  1. Connection starts dead, socket connect is initiated, connection is restored, socket connect succeeds
  2. Connection starts as usual, socket connection is established, connection drops, channel join is attempted, connection is restored, channel join succeeds
  3. Connection starts as usual, socket connection is established and channel joined, connection drops then is restored, message is sent on channel and reply is received

To test those, a control side-channel was added to the test backend so the client can tell the backend to start and stop the websocket server at precise times.