Skip to content

test(workflow-operator): add unit test coverage for LimitOpExec#4774

Merged
Yicong-Huang merged 2 commits into
apache:mainfrom
aglinxinyuan:xinyuan-test-limit-op-exec-spec
May 3, 2026
Merged

test(workflow-operator): add unit test coverage for LimitOpExec#4774
Yicong-Huang merged 2 commits into
apache:mainfrom
aglinxinyuan:xinyuan-test-limit-op-exec-spec

Conversation

@aglinxinyuan
Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

Add LimitOpExecSpec covering the bounded-emission contract of LimitOpExec:

  • Tuples are emitted while the count is below the configured limit
  • Emission stops once the limit is reached
  • The count is cumulative across processTuple invocations
  • Limit of 0 emits nothing
  • open() resets count to 0

Any related issues, documentation, discussions?

Closes #4773

How was this PR tested?

sbt "WorkflowOperator/testOnly org.apache.texera.amber.operator.limit.LimitOpExecSpec" — 5/5 tests pass.

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

Generated-by: Claude Code (Claude Opus 4.7)

Add LimitOpExecSpec covering processTuple emission while under the
configured limit, stop after the limit is reached, cumulative count
across invocations, the limit=0 edge case, and open() count reset.

Closes apache#4773

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 3, 2026 01:45
@github-actions github-actions Bot added the common label May 3, 2026
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.49%. Comparing base (32e0c61) to head (76be674).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #4774      +/-   ##
============================================
+ Coverage     43.46%   43.49%   +0.02%     
- Complexity     2066     2074       +8     
============================================
  Files           957      957              
  Lines         34077    34077              
  Branches       3753     3753              
============================================
+ Hits          14813    14823      +10     
+ Misses        18467    18457      -10     
  Partials        797      797              
Flag Coverage Δ
access-control-service 28.12% <ø> (ø)
amber 41.87% <ø> (+0.06%) ⬆️
computing-unit-managing-service 0.00% <ø> (ø)
config-service 0.00% <ø> (ø)
file-service 33.24% <ø> (ø)
workflow-compiling-service 47.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds ScalaTest unit coverage for LimitOpExec to validate its bounded-emission behavior and state reset semantics, addressing missing tests for this operator in the workflow-operator module.

Changes:

  • Introduces LimitOpExecSpec with test cases for emitting up to limit, stopping after reaching limit, and handling limit = 0.
  • Verifies count is cumulative across processTuple calls and that open() resets count to 0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aglinxinyuan aglinxinyuan requested a review from Yicong-Huang May 3, 2026 01:59
@Yicong-Huang Yicong-Huang enabled auto-merge (squash) May 3, 2026 07:23
@Yicong-Huang Yicong-Huang merged commit bbc50e2 into apache:main May 3, 2026
16 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.

add unit test coverage for LimitOpExec

4 participants