You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "aglinxinyuan (via GitHub)" <gi...@apache.org> on 2026/07/12 13:02:38 UTC
[PR] test(frontend): extend ExecuteWorkflowService coverage [texera]
aglinxinyuan opened a new pull request, #6371:
URL: https://github.com/apache/texera/pull/6371
### What changes were proposed in this PR?
Extends the `ExecuteWorkflowService` spec (was ~49% covered): the websocket-event switch (region/region-state/worker-assignment/default), reconfiguration-event notifications, execution-state transitions, and request-builder helpers.
### Any related issues, documentation, discussions?
Closes #6368.
### How was this PR tested?
Added 24 tests (now 35), driving the faked WorkflowWebsocketService event subject; clears sessionStorage in afterEach. Verified locally with Vitest and CI's `format:ci` gate clean. Test-only change — no production code is modified.
### Was this PR authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 4.8 [1M context])
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(frontend): extend ExecuteWorkflowService coverage [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #6371:
URL: https://github.com/apache/texera/pull/6371#issuecomment-4951274700
<!-- texera-reviewer-suggestion -->
### Automated Reviewer Suggestions
Based on the `git blame` history of the changed files, we recommend the following reviewers:
- **Contributors with relevant context:** `@kunwp1`
You can notify them by mentioning `@kunwp1` in a comment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(frontend): extend ExecuteWorkflowService coverage [texera]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #6371:
URL: https://github.com/apache/texera/pull/6371#issuecomment-4951291625
## [Codecov](https://app.codecov.io/gh/apache/texera/pull/6371?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 66.21%. Comparing base ([`afa8af2`](https://app.codecov.io/gh/apache/texera/commit/afa8af22b2ac0279fbcc0c610cfe54e3ee0ef0b8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`853d72b`](https://app.codecov.io/gh/apache/texera/commit/853d72bf9f9977d2f48e90db9eb8759a856fb480?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## main #6371 +/- ##
============================================
+ Coverage 66.04% 66.21% +0.16%
Complexity 3380 3380
============================================
Files 1142 1142
Lines 44980 44980
Branches 4948 4948
============================================
+ Hits 29709 29783 +74
+ Misses 13631 13563 -68
+ Partials 1640 1634 -6
```
| [Flag](https://app.codecov.io/gh/apache/texera/pull/6371/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | *Carryforward flag |
|---|---|---|---|
| [access-control-service](https://app.codecov.io/gh/apache/texera/pull/6371/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `70.00% <ø> (ø)` | | Carriedforward from [afa8af2](https://app.codecov.io/gh/apache/texera/commit/afa8af22b2ac0279fbcc0c610cfe54e3ee0ef0b8?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [agent-service](https://app.codecov.io/gh/apache/texera/pull/6371/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `51.90% <ø> (ø)` | | Carriedforward from [afa8af2](https://app.codecov.io/gh/apache/texera/commit/afa8af22b2ac0279fbcc0c610cfe54e3ee0ef0b8?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [amber](https://app.codecov.io/gh/apache/texera/pull/6371/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `66.57% <ø> (ø)` | | Carriedforward from [afa8af2](https://app.codecov.io/gh/apache/texera/commit/afa8af22b2ac0279fbcc0c610cfe54e3ee0ef0b8?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [computing-unit-managing-service](https://app.codecov.io/gh/apache/texera/pull/6371/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `9.97% <ø> (ø)` | | Carriedforward from [afa8af2](https://app.codecov.io/gh/apache/texera/commit/afa8af22b2ac0279fbcc0c610cfe54e3ee0ef0b8?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [config-service](https://app.codecov.io/gh/apache/texera/pull/6371/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `52.30% <ø> (ø)` | | Carriedforward from [afa8af2](https://app.codecov.io/gh/apache/texera/commit/afa8af22b2ac0279fbcc0c610cfe54e3ee0ef0b8?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [file-service](https://app.codecov.io/gh/apache/texera/pull/6371/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `63.97% <ø> (ø)` | | Carriedforward from [afa8af2](https://app.codecov.io/gh/apache/texera/commit/afa8af22b2ac0279fbcc0c610cfe54e3ee0ef0b8?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [frontend](https://app.codecov.io/gh/apache/texera/pull/6371/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `63.89% <ø> (+0.38%)` | :arrow_up: | |
| [notebook-migration-service](https://app.codecov.io/gh/apache/texera/pull/6371/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `78.94% <ø> (ø)` | | Carriedforward from [afa8af2](https://app.codecov.io/gh/apache/texera/commit/afa8af22b2ac0279fbcc0c610cfe54e3ee0ef0b8?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [pyamber](https://app.codecov.io/gh/apache/texera/pull/6371/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `91.18% <ø> (ø)` | | Carriedforward from [afa8af2](https://app.codecov.io/gh/apache/texera/commit/afa8af22b2ac0279fbcc0c610cfe54e3ee0ef0b8?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [workflow-compiling-service](https://app.codecov.io/gh/apache/texera/pull/6371/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.14% <ø> (ø)` | | Carriedforward from [afa8af2](https://app.codecov.io/gh/apache/texera/commit/afa8af22b2ac0279fbcc0c610cfe54e3ee0ef0b8?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
*This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/texera/pull/6371?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(frontend): extend ExecuteWorkflowService coverage [texera]
Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan commented on code in PR #6371:
URL: https://github.com/apache/texera/pull/6371#discussion_r3567373378
##########
frontend/src/app/workspace/service/execute-workflow/execute-workflow.service.spec.ts:
##########
@@ -82,6 +91,17 @@ describe("ExecuteWorkflowService", () => {
mockWorkflowSnapshotService = TestBed.inject(WorkflowSnapshotService);
});
+ afterEach(() => {
+ // sendExecutionRequest reads/writes sessionStorage; keep tests isolated
+ sessionStorage.clear();
+ });
+
+ // Push an event through the same Subject the real WorkflowWebsocketService feeds, so the
+ // constructor subscription in ExecuteWorkflowService runs exactly as it would in production.
+ const emitWsEvent = (event: TexeraWebsocketEvent): void => {
+ (service as any).workflowWebsocketService.webSocketResponseSubject.next(event);
+ };
Review Comment:
The helper now goes through the public API: `TestBed.inject(WorkflowWebsocketService).websocketEvent() as Subject<...>` and calls `.next` on that — coupled only to `websocketEvent()` returning the event stream, not to the private field name (d2bef4a).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(frontend): extend ExecuteWorkflowService coverage [texera]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #6371:
URL: https://github.com/apache/texera/pull/6371#discussion_r3566352256
##########
frontend/src/app/workspace/service/execute-workflow/execute-workflow.service.spec.ts:
##########
@@ -82,6 +91,17 @@ describe("ExecuteWorkflowService", () => {
mockWorkflowSnapshotService = TestBed.inject(WorkflowSnapshotService);
});
+ afterEach(() => {
+ // sendExecutionRequest reads/writes sessionStorage; keep tests isolated
+ sessionStorage.clear();
+ });
+
+ // Push an event through the same Subject the real WorkflowWebsocketService feeds, so the
+ // constructor subscription in ExecuteWorkflowService runs exactly as it would in production.
+ const emitWsEvent = (event: TexeraWebsocketEvent): void => {
+ (service as any).workflowWebsocketService.webSocketResponseSubject.next(event);
+ };
Review Comment:
The test helper reaches into `WorkflowWebsocketService`'s private `webSocketResponseSubject` field. This makes the spec brittle to internal refactors of that service; prefer emitting via the public `websocketEvent()` API (casting to access `.next` for tests) so the helper is less coupled to private implementation details.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] test(frontend): extend ExecuteWorkflowService coverage [texera]
Posted by "aglinxinyuan (via GitHub)" <gi...@apache.org>.
aglinxinyuan merged PR #6371:
URL: https://github.com/apache/texera/pull/6371
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org