You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "aglinxinyuan (via GitHub)" <gi...@apache.org> on 2026/05/03 01:17:27 UTC

[PR] test(amber): add unit test coverage for engine common Utils [texera]

aglinxinyuan opened a new pull request, #4743:
URL: https://github.com/apache/texera/pull/4743

   ### What changes were proposed in this PR?
   
   Add `UtilsSpec` covering the helpers in `org.apache.texera.amber.engine.common.Utils` (`amber/src/main/scala/org/apache/texera/amber/engine/common/Utils.scala`):
   
   - `aggregatedStateToString` round-trips every named `WorkflowAggregatedState` through `stringToAggregatedState`, and renders the `Unrecognized` variant with its raw value
   - `stringToAggregatedState` is case-insensitive, trims whitespace, accepts the `Initializing` alias for `READY`, and throws `IllegalArgumentException` for unknown names
   - `maptoStatusCode` returns the documented byte codes for known states and `-1` for the rest
   - `retry` returns immediately on success, retries on failure up to the attempt limit, and rethrows after exhaustion
   - `withLock` releases the lock after both normal return and exception
   
   ### Any related issues, documentation, discussions?
   
   Closes #4742
   
   ### How was this PR tested?
   
   `sbt "WorkflowExecutionService/testOnly org.apache.texera.amber.engine.common.UtilsSpec"` — 12/12 tests pass.
   
   ### 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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(amber): add unit test coverage for engine common Utils [texera]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #4743:
URL: https://github.com/apache/texera/pull/4743#issuecomment-4365111806

   ## [Codecov](https://app.codecov.io/gh/apache/texera/pull/4743?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 42.14%. Comparing base ([`a5b8957`](https://app.codecov.io/gh/apache/texera/commit/a5b895715e589f7f74c1459cd314861288126532?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`f056904`](https://app.codecov.io/gh/apache/texera/commit/f0569047b78cadd7732d09e1a5128814139fa093?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##               main    #4743      +/-   ##
   ============================================
   + Coverage     42.13%   42.14%   +0.01%     
     Complexity     2001     2001              
   ============================================
     Files           957      957              
     Lines         34094    34094              
     Branches       3753     3753              
   ============================================
   + Hits          14364    14370       +6     
   + Misses        18952    18946       -6     
     Partials        778      778              
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/texera/pull/4743/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [python](https://app.codecov.io/gh/apache/texera/pull/4743/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `83.95% <ø> (+0.15%)` | :arrow_up: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/texera/pull/4743?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(amber): add unit test coverage for engine common Utils [texera]

Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang merged PR #4743:
URL: https://github.com/apache/texera/pull/4743


-- 
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: notifications-unsubscribe@texera.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org