The GitHub Actions job "Required Checks" on texera.git/main has succeeded.
Run started by GitHub user Yicong-Huang (triggered by Yicong-Huang).

Head commit for run:
fc8395105819f232cc9b82adc3ea22c92bd6d78e / Xinyuan Lin <[email protected]>
test(amber): add unit test coverage for StateManager (#4738)

### What changes were proposed in this PR?

Add `StateManagerSpec` covering the full public surface of
`StateManager`
(`amber/src/main/scala/org/apache/texera/amber/engine/common/statetransition/StateManager.scala`):

- `getCurrentState` reports the initial state
- `transitTo` advances on a valid edge, is a no-op on self-transition,
throws `InvalidTransitionException` for non-successor targets, and
throws for states absent from the graph keys
- `assertState` (single + varargs) returns normally on match and throws
`InvalidStateException` on mismatch
- `confirmState` (single + varargs) reports membership without side
effects
- `conditionalTransitTo` runs the callback only when the precondition
holds, does nothing otherwise, and still validates the transition edge

### Any related issues, documentation, discussions?

Closes #4737

### How was this PR tested?

`sbt "WorkflowExecutionService/testOnly
org.apache.texera.amber.engine.common.statetransition.StateManagerSpec"`
— 13/13 tests pass.

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 4.7)

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>

Report URL: https://github.com/apache/texera/actions/runs/25272195308

With regards,
GitHub Actions via GitBox

Reply via email to