Skip to content

test(amber): add unit test coverage for WorkflowScheduler#4564

Merged
aglinxinyuan merged 2 commits intoapache:mainfrom
aglinxinyuan:xinyuan-test-scheduler-spec
Apr 30, 2026
Merged

test(amber): add unit test coverage for WorkflowScheduler#4564
aglinxinyuan merged 2 commits intoapache:mainfrom
aglinxinyuan:xinyuan-test-scheduler-spec

Conversation

@aglinxinyuan
Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Add WorkflowSchedulerSpec covering the public contract of WorkflowScheduler (amber/src/main/scala/org/apache/texera/amber/engine/architecture/controller/WorkflowScheduler.scala):

  • updateSchedule populates getSchedule and physicalPlan from the input workflow
  • The produced schedule covers every operator in the (post-update) physical plan
  • getNextRegions exhausts the schedule and then returns an empty set
  • The union of region sets pulled via getNextRegions matches getSchedule.getRegions

Any related issues, documentation, discussions?

Closes #4563

How was this PR tested?

sbt "WorkflowExecutionService/testOnly org.apache.texera.amber.engine.architecture.controller.WorkflowSchedulerSpec" — 4/4 tests pass.

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

Generated-by: Claude Code (Claude Opus 4.7)

### What changes were proposed in this PR?

Add `WorkflowSchedulerSpec` covering the public contract of
`WorkflowScheduler`:

- `updateSchedule` populates `getSchedule` and `physicalPlan` from the
  input workflow
- The produced schedule covers every operator in the (post-update)
  physical plan
- `getNextRegions` exhausts the schedule and then returns an empty set
- The union of region sets pulled via `getNextRegions` matches
  `getSchedule.getRegions`

### Any related issues, documentation, discussions?

Closes apache#4563

### How was this PR tested?

`sbt "WorkflowExecutionService/testOnly org.apache.texera.amber.engine.architecture.controller.WorkflowSchedulerSpec"` — 4/4 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) <noreply@anthropic.com>
@aglinxinyuan aglinxinyuan enabled auto-merge (squash) April 30, 2026 08:57
@aglinxinyuan aglinxinyuan merged commit 9b42aed into apache:main Apr 30, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test(amber): add unit test coverage for WorkflowScheduler

2 participants