savinmax 516f8c5008 test(hub): add integration tests for room isolation
Add dedicated integration tests verifying message isolation between rooms:

- TestIntegration_SameRoomBroadcast: two clients in /chat both receive
  broadcast messages
- TestIntegration_CrossRoomIsolation: client in /room-a does not leak
  messages to client in /room-b (verified via read deadline timeout)
- TestIntegration_MultipleRoomsSimultaneous: 3 rooms with 2 clients
  each, messages stay within their room
- TestIntegration_RoomCleanup: verifies RoomCount() increases on
  connect and decreases (room removed) on last client disconnect
- TestIntegration_RoomCleanup_MultipleClients: room persists while
  any client remains connected
- TestIntegration_RoomCleanup_ConcurrentDisconnects: 5 rooms cleaned
  up concurrently without races

Also introduces dialWSPath(t, server, path) helper for tests that
specify WebSocket paths directly with a leading slash.

All tests pass with -race flag.

🤖 Assisted by the code-assist SOP
2026-06-13 13:30:43 +02:00
..