You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@texera.apache.org by GitBox <gi...@apache.org> on 2026/07/23 00:12:56 UTC
[GH] (texera/gh-readonly-queue/main/pr-6765-77959caf66be385753f55273f42a77406af5dc93): Workflow run "Required Checks" failed!
The GitHub Actions job "Required Checks" on texera.git/gh-readonly-queue/main/pr-6765-77959caf66be385753f55273f42a77406af5dc93 has failed.
Run started by GitHub user aglinxinyuan (triggered by aglinxinyuan).
Head commit for run:
07b195608f66549fedfecf4243133b14133d2a9c / Meng Wang <me...@uci.edu>
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/29967770812
With regards,
GitHub Actions via GitBox