aglinxinyuan opened a new pull request, #4743: URL: https://github.com/apache/texera/pull/4743
### What changes were proposed in this PR? Add `UtilsSpec` covering the helpers in `org.apache.texera.amber.engine.common.Utils` (`amber/src/main/scala/org/apache/texera/amber/engine/common/Utils.scala`): - `aggregatedStateToString` round-trips every named `WorkflowAggregatedState` through `stringToAggregatedState`, and renders the `Unrecognized` variant with its raw value - `stringToAggregatedState` is case-insensitive, trims whitespace, accepts the `Initializing` alias for `READY`, and throws `IllegalArgumentException` for unknown names - `maptoStatusCode` returns the documented byte codes for known states and `-1` for the rest - `retry` returns immediately on success, retries on failure up to the attempt limit, and rethrows after exhaustion - `withLock` releases the lock after both normal return and exception ### Any related issues, documentation, discussions? Closes #4742 ### How was this PR tested? `sbt "WorkflowExecutionService/testOnly org.apache.texera.amber.engine.common.UtilsSpec"` — 12/12 tests pass. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 4.7) -- 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]
