vscode-coder icon indicating copy to clipboard operation
vscode-coder copied to clipboard

Test SSE connections are not leaked

Open BrunoQuaresma opened this issue 7 months ago • 1 comments

Recently, we had an issue related to SSE connections leaked causing some overload in the API. It was fixed by https://github.com/coder/vscode-coder/pull/479, but we want to be sure this is not going to happen again. Since the test for this scenario is not trivial, we decided to create this follow-up issue.

After putting some thoughts on this, a good approach for testing could be having an integration test that would spin up a simple http server with an SSE endpoint, and use this custom streaming implementation to connect and disconnect the agent a few times, and see how many connections are still live. Keep in mind this is only one possibility, if you find a better, and easy way to test, please feel free to use it.

BrunoQuaresma avatar Apr 15 '25 13:04 BrunoQuaresma

How relevant is this after https://github.com/coder/vscode-coder/pull/580 has landed? We do not use any SSEs now and rely solely on a one-way WebSocket connection which has a different life-cycle.

EhabY avatar Sep 17 '25 10:09 EhabY