Break Our Application Like a User (Part II)
Explore how to use acceptance testing to simulate real user disconnections and reconnections in Phoenix real-time applications. Understand how to verify that the application's WebSocket channel reconnects smoothly, preserving seamless user experience despite network interruptions and server restarts.
We'll cover the following...
We'll cover the following...
Internet-related actions
Internet connections are unreliable. Connections can randomly fail when we’re on a laptop or desktop, and it’s more common than it should be to have a low-quality data connection on cell phones. We need to ensure that our application can properly reconnect a user’s connection, even if the page has been open for a long time.
The official Channels JavaScript client handles reconnection attempts for us. It uses a back-off algorithm ...