Files
esp-idf/examples/protocols/http_server
Hrushikesh Bhosale 9ab588078e fix(http_server/ws_echo_server): Fix ws_echo_server test URI registration race condition
The WebSocket echo server tests connect immediately after seeing
'Starting server on port:' in the device log, but URI handlers
(/ws, /auth) are registered asynchronously after the server starts,
taking 40-660ms depending on config and CI load.

This causes two failures:
1. WebSocket handshake returns 404 Not Found because the URI
   handler is not registered yet when the client connects.
2. WebSocket echo returns wrong data because the server is in a
   partially initialized state.

Wait for 'Returned from app_main()' before connecting, which
guarantees all URI handlers are registered. Add connection retry
with WebSocketBadStatusException handling to WsClient.

Extract _wait_for_server_ready() helper to deduplicate the WiFi
credential input and server readiness logic.

(cherry picked from commit 7a50e3ab04)
2026-06-01 11:36:01 +05:30
..