The GitHub Actions job "Required Checks" on texera.git/gh-readonly-queue/main/pr-6765-5aa2b79e8f32260a6b588cc1fa1f704d2d1f4365 has failed. Run started by GitHub user aglinxinyuan (triggered by aglinxinyuan).
Head commit for run: 31a28b9e567a7f30dc543dc95fda03986893b906 / Meng Wang <[email protected]> test(frontend): cover ComputingUnitStatusService polling/state and WorkflowWebsocketService events (#6765) ### What changes were proposed in this PR? Extends two related workspace service specs (`frontend/src/app/common/service/computing-unit/computing-unit-status/computing-unit-status.service.ts`, `frontend/src/app/workspace/service/workflow-websocket/workflow-websocket.service.ts`) to cover the state-management, polling and connection logic they had left untested. No production code was changed. **`ComputingUnitStatusService`** (+5 tests) - `updateUnitInList` — replaces the matching unit and leaves the others untouched; - `setComputingUnitsState` — refreshes the selected unit when it is still present, and clears the selection + stops polling when the selected unit disappears; - `startPollingSelectedUnit` — with `vi.useFakeTimers()`, re-fetches the unit on each interval tick and merges the result; `stopPollingSelectedUnit` halts further polling (real timers restored in a `finally`). **`WorkflowWebsocketService`** (+3 tests) - `websocketEvent` — surfaces events pushed onto the response stream; - `getConnectionStatusStream` / `updateConnectionStatus` — reflect connect/disconnect transitions and guard duplicate values; - `openWebsocket` — routes an incoming socket message to `websocketEvent` and marks the connection up, driven through a fake `window.WebSocket` (the spec's existing test double), so no real socket is opened. ### Any related issues, documentation, discussions? Closes #6754 ### How was this PR tested? Extended unit tests, run locally in `frontend/` (all green; the failure path was verified by breaking the polling and connection assertions to confirm the suite goes red): ``` ng test --watch=false --include src/app/common/service/computing-unit/computing-unit-status/computing-unit-status.service.spec.ts # 18 passed ng test --watch=false --include src/app/workspace/service/workflow-websocket/workflow-websocket.service.spec.ts # 6 passed prettier --write <specs> # clean eslint <specs> # clean ``` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.8 [1M context]) Report URL: https://github.com/apache/texera/actions/runs/29967848886 With regards, GitHub Actions via GitBox
