Fixed testing glitch

SSE connections weren't being closed properly in unit tests, causing timeout errors.