mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-10 07:18:10 -05:00
The test 'should call onMessage handler when WebSocket receives a message' was failing intermittently in CI due to a race condition. The broadcast would sometimes happen before the first onMessageSpy check completed, causing the test to expect 'Hello from server!' but receive 'Welcome to the WebSocket!'. This fix ensures the onMessageSpy has been called once before broadcasting the second message, and wraps the final assertion in waitFor as well. Co-authored-by: openhands <openhands@all-hands.dev>