frontend: Add webSocket polling and initial timeouts#4034
frontend: Add webSocket polling and initial timeouts#4034joaquimrocha wants to merge 1 commit intokubernetes-sigs:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: joaquimrocha The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Pull Request Overview
This PR adds timeout functionality to WebSocket connections to prevent tests from hanging indefinitely. The changes introduce proper error handling with timeouts for both existing connection waits and new connection attempts.
- Added 5-second timeout for WebSocket connection attempts
- Enhanced connection polling with timeout and failure detection
- Updated test expectations to match new timeout error messages
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| frontend/src/lib/k8s/api/v2/webSocket.ts | Added timeout logic for WebSocket connections and improved polling mechanism |
| frontend/src/lib/k8s/api/v2/webSocket.test.ts | Updated test expectation to match new timeout error message |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
e10a58b to
e52cc26
Compare
6a41b87 to
9020964
Compare
To avoid tests failing unexpectedly.
9020964 to
21ca190
Compare
|
I've closed the PR where this change was needed. So I don't think this is needed in the end. |
Summary
This change will avoid tests failing unexpectedly.
Separated from #3953 .