aglinxinyuan opened a new pull request, #5400: URL: https://github.com/apache/texera/pull/5400
### What changes were proposed in this PR? Adds `CoreExecutorSpec` covering every file in `common/workflow-core/.../core/executor/` — the abstract executor contract plus the reflection-based factory. Bundled because the three files form one cohesive cluster (the trait, its source-side subtype, and the factory that instantiates implementations of both). | File | Behavior pinned | | --- | --- | | `OperatorExecutor.scala` | Default no-op `open` / `close` (idempotent across lifecycle); `produceStateOnStart` / `produceStateOnFinish` default to `None`; `processState` defaults to `Some(state)`; `onFinish` defaults to `Iterator.empty`. `processTupleMultiPort` / `onFinishMultiPort` default wrappers pair each emission with `Option.empty` port and forward the input `port` id verbatim to the subclass override; zero-/many-emission fan-out covered. | | `SourceOperatorExecutor.scala` | Overrides: no-op `open` / `close`; `processTuple` returns `Iterator.empty` (sources don't consume input); the input-side `processTupleMultiPort` returns `Iterator.empty` without ever calling `produceTuple`; `onFinishMultiPort` delegates to `produceTuple` and wraps each emitted tuple with `Option.empty` port. | | `ExecFactory.scala` | `newExecFromJavaClassName`: no-arg constructor when `descString` is empty; `(String)` constructor when non-empty; `NoSuchMethodException` fallback to `(Int, Int)` / `(String, Int, Int)`; `ClassNotFoundException` for an unresolved name; `NoSuchMethodException` propagates when neither factory branch matches a fixture with only a `(Long)` constructor. `newExecFromJavaCode`: diagnostic-collection branch covered with a syntactically-broken source. The happy-path compile-and-construct test is intentionally omitted — `JavaRuntimeCompilation`'s in-memory compiler does not inherit sbt's test classpath, so a source that implements `OperatorExecutor` can't resolve the trait at javac time. | No production code changed; this is test-only. ### Any related issues, documentation, discussions? Closes #5396 ### How was this PR tested? ``` sbt "WorkflowCore/Test/testOnly org.apache.texera.amber.core.executor.CoreExecutorSpec" # → 22 tests, all pass sbt "WorkflowCore/Test/scalafmtCheck" # → clean ``` ### 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
