You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "mengw15 (via GitHub)" <gi...@apache.org> on 2026/07/12 01:37:20 UTC
[I] add unit test coverage for Utils state mapping helpers (aggregatedStateToString / stringToAggregatedState / maptoStatusCode) [texera]
mengw15 opened a new issue, #6360:
URL: https://github.com/apache/texera/issues/6360
### Task Summary
`amber/src/main/scala/org/apache/texera/amber/engine/common/Utils.scala` (codecov ~56%) has three pure `WorkflowAggregatedState` mapping helpers with no test guarding them. Pure functions — a plain `AnyFlatSpec` covers them (runs in the amber unit job, no infra).
### Behavior to cover
- `aggregatedStateToString` — each state -> its label: `UNINITIALIZED`->"Uninitialized", `READY`->"Initializing", `RUNNING`->"Running", `PAUSING`->"Pausing", `PAUSED`->"Paused", `RESUMING`->"Resuming", `COMPLETED`->"Completed", `TERMINATED`->"Terminated", `FAILED`->"Failed", `KILLED`->"Killed", `UNKNOWN`->"Unknown"; `Unrecognized(v)` -> `"Unrecognized(v)"`
- `stringToAggregatedState` — case-insensitive + trimmed (`" RUNNING "` -> `RUNNING`); `"initializing"` is an alias for `READY` (same as `"ready"`); every known label maps back; an unknown string throws `IllegalArgumentException`
- `maptoStatusCode` — `UNINITIALIZED`->0, `READY`->0, `RUNNING`->1, `PAUSED`->2, `COMPLETED`->3, `FAILED`->4, `KILLED`->5; every other state (`PAUSING`, `RESUMING`, `TERMINATED`, `UNKNOWN`, `Unrecognized`) -> `-1`
- Round-trip: `stringToAggregatedState(aggregatedStateToString(s))` recovers `s` for the covered states (mind the `READY`/"Initializing" alias)
### Task Type
- [ ] Refactor / Cleanup
- [ ] DevOps / Deployment / CI
- [x] Testing / QA
- [ ] Documentation
- [ ] Performance
- [ ] Other
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] add unit test coverage for Utils state mapping helpers (aggregatedStateToString / stringToAggregatedState / maptoStatusCode) [texera]
Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 closed issue #6360: add unit test coverage for Utils state mapping helpers (aggregatedStateToString / stringToAggregatedState / maptoStatusCode)
URL: https://github.com/apache/texera/issues/6360
--
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: [I] add unit test coverage for Utils state mapping helpers (aggregatedStateToString / stringToAggregatedState / maptoStatusCode) [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6360:
URL: https://github.com/apache/texera/issues/6360#issuecomment-4949496848
<!-- texera:template-compliance -->
👋 Thanks for opening this issue, @mengw15!
It looks like the issue description doesn't quite follow our template yet:
- This issue doesn't appear to use one of our templates (Bug, Feature, or Task). Please open it using a template so the required details are captured.
Filling out the template helps reviewers understand and triage your contribution faster. Please edit the description to complete it. This message will disappear automatically once the template is followed.
You can find the template prompts by editing the description, or see [CONTRIBUTING.md](https://github.com/apache/texera/blob/main/CONTRIBUTING.md) for the full contribution flow.
--
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: [I] add unit test coverage for Utils state mapping helpers (aggregatedStateToString / stringToAggregatedState / maptoStatusCode) [texera]
Posted by "mengw15 (via GitHub)" <gi...@apache.org>.
mengw15 commented on issue #6360:
URL: https://github.com/apache/texera/issues/6360#issuecomment-4950162495
Closing — the three helpers this targets (`aggregatedStateToString`, `stringToAggregatedState`, `maptoStatusCode`) are already fully covered by `UtilsSpec.scala` (added in #4743). The file's remaining uncovered lines are the `amberHomePath` filesystem-resolution path, a separate and harder target. Filed in error from the file-level coverage number.
--
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