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

Head commit for run:
945849ce4f7ba77091e930b53b0b35440e33b994 / Yicong Huang 
<[email protected]>
test(amber): add unit tests for deploy strategies (#4723)

### What changes were proposed in this PR?

Adds scalatest coverage for the three deploy strategies in
`amber/src/main/scala/org/apache/texera/amber/engine/architecture/deploysemantics/deploystrategy/{OneOnEach,RoundRobinDeployment,RandomDeployment}.scala`.
Three known divergences are pinned in the spec with explanatory
comments:

- `OneOnEach.initialize` does not reset the iteration cursor — reusing
the same instance with a new array continues counting from the prior
position.
- The empty-array fault surfaces with three different exception types:
`IndexOutOfBoundsException` (OneOnEach), `ArithmeticException`
(RoundRobinDeployment, divide-by-zero on the modulo), and
`IllegalArgumentException` (RandomDeployment, `Random.nextInt(0)`). A
future fix that aligns the empty-array contract across strategies will
deliberately break these specs.

### Any related issues, documentation, discussions?

Closes #4722.

### How was this PR tested?

```
sbt scalafmtCheckAll
sbt "WorkflowExecutionService/testOnly 
org.apache.texera.amber.engine.architecture.deploysemantics.deploystrategy.DeployStrategiesSpec"
```

### 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]>
Co-authored-by: Xinyuan Lin <[email protected]>

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

With regards,
GitHub Actions via GitBox

Reply via email to