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

   ### What changes were proposed in this PR?
   
   Extracts the repeated "run a workflow and read its materialized results" 
boilerplate from the amber e2e specs into two reusable helpers on `TestUtils`:
   
   - `readMaterializedResults(executionId, operatorIds, extract)` — resolve + 
open each operator's external RESULT document and apply `extract` to the opened 
`VirtualDocument[Tuple]` (operators with no materialized output are skipped).
   - `runWorkflowAndReadResults(system, workflow, operatorIds, extract, 
completionTimeout)` — run a workflow to `COMPLETED` (a `FatalError` aborts and 
surfaces as the awaited exception), then read results via 
`readMaterializedResults`.
   
   `DataProcessingSpec.executeWorkflow` now calls the shared harness instead of 
its own inline copy. The helpers are loop/state-agnostic — they only use 
existing core APIs (`DocumentFactory`, `VirtualDocument[Tuple]`, `AmberClient`, 
`ExecutionStateUpdate`, `FatalError`), so other e2e specs can adopt them too.
   
   ### Any related issues, documentation, discussions?
   
   Resolves #5711 (sub-issue of #4442 "Introduce for loop"). Split out of #5700 
to keep that PR reviewable, per @Xiao-zhen-Liu's 
[review](https://github.com/apache/texera/pull/4206#pullrequestreview-4482667715).
   
   ### How was this PR tested?
   
   Behavior-preserving refactor of existing e2e test infrastructure. 
`WorkflowExecutionService/Test/compile` and 
`WorkflowExecutionService/scalafmtCheckAll` pass locally. The 
`@IntegrationTest` specs that exercise the harness (e.g. `DataProcessingSpec`) 
run in CI — they spawn Python workers and can't run on Windows.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Co-authored with Claude Opus 4.8 in compliance with ASF.


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