Yicong-Huang opened a new pull request, #4723:
URL: https://github.com/apache/texera/pull/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)


-- 
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