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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to