test(workflow-operator): add unit test coverage for LimitOpExec#4774
Merged
Yicong-Huang merged 2 commits intoMay 3, 2026
Merged
Conversation
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>
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
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
LimitOpExecSpecwith test cases for emitting up tolimit, stopping after reachinglimit, and handlinglimit = 0. - Verifies
countis cumulative acrossprocessTuplecalls and thatopen()resetscountto0.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Yicong-Huang
approved these changes
May 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
Add
LimitOpExecSpeccovering the bounded-emission contract ofLimitOpExec:processTupleinvocations0emits nothingopen()resetscountto0Any 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)