aglinxinyuan opened a new issue, #8939:
URL: https://github.com/apache/texera/issues/8939

   ### What happened?
   
   When an operator throws inside an amber e2e or integration test, the test 
fails with a timeout instead of the operator's error. 
`TestUtils.runWorkflowAndReadResults` waits until the full `completionTimeout` 
(90 s in `LoopIntegrationSpec`, 1 min by default) and then fails with 
`com.twitter.util.TimeoutException`. With `withRetry` the run is retried, so 
the test spends twice the deadline. The real error never appears in the test 
report.
   
   The harness ends a run only on `ExecutionStateUpdate(COMPLETED)` or a 
`FatalError` event. A worker whose executor throws while processing does not 
raise a `FatalError`:
   
   - A JVM worker's `DataProcessor.handleExecutorException` sends the error to 
the coordinator as an ERROR `ConsoleMessage` and pauses the worker in place 
(`OperatorLogicPause`).
   - A Python worker's `Context.report_exception` does the same.
   - The coordinator forwards the `ConsoleMessage` to the client. No 
`ExecutionStateUpdate` follows, not even PAUSED, because an operator-logic 
pause does not change the worker's state.
   
   So the run never completes, and the harness ignores the one event that 
carries the error. `SyncExecutionResource` already treats an ERROR console 
message as the end of a run (`ConsoleErrorDetected`); the test harness does not.
   
   ```
   Before:  operator throws -> ERROR console message, worker paused -> harness 
waits out the deadline -> TimeoutException
   After:   operator throws -> ERROR console message, worker paused -> harness 
fails at once with the operator's error
   ```
   
   Expected behavior: the harness fails as soon as a worker reports an error, 
with the error's title and stack trace and the failing worker, as it does for a 
`FatalError`.
   
   ### How to reproduce?
   
   Run a workflow through `TestUtils.runWorkflowAndReadTerminalResults` in 
which a JVM operator throws on a tuple, for example a CSV scan of 
`country_sales_small.csv` followed by a Type Casting of the text column 
`Region` to `integer`. The cast throws `AttributeTypeException: Failed to parse 
type java.lang.String to Integer: ...` on the first tuple. The call returns 
only after `completionTimeout`, with `com.twitter.util.TimeoutException`.
   
   ### Version/Branch
   
   1.4.0-incubating-SNAPSHOT (main)
   
   ### Commit Hash (Optional)
   
   be65bf8564
   
   ### What browsers are you seeing the problem on?
   
   _No response_
   
   ### Relevant log output
   
   Both Type Casting workers log the error and pause on their first tuple. The 
harness then waits until its deadline:
   
   ```shell
   [2026-10-08 23:36:56,477] [WARN] [WF8-TypeCastingOpDesc-3be973-main-1] 
[DataProcessor] [DP-thread] - Failed to parse type java.lang.String to Integer: 
Australia and Oceania
   [2026-10-08 23:36:56,478] [WARN] [WF8-TypeCastingOpDesc-3be973-main-0] 
[DataProcessor] [DP-thread] - Failed to parse type java.lang.String to Integer: 
Central America and the Caribbean
   ...
   com.twitter.util.TimeoutException was thrown after 1 minute, 3 seconds
   ```
   


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