Skip to content

add unit test coverage for core executor traits + factory #5396

Closed

Description

@aglinxinyuan

The org.apache.texera.amber.core.executor package defines the abstract executor contract every operator implementation has to honor, plus the reflection-based factory that compiles / instantiates them. Nothing in the package is unit-tested today.

Add a single CoreExecutorSpec covering:

File Behavior to pin
OperatorExecutor.scala Default no-op open / close; produceStateOnStart / produceStateOnFinish default to None; processState defaults to Some(state); processTupleMultiPort wraps processTuple with Option.empty ports; onFinishMultiPort wraps onFinish similarly; onFinish defaults to Iterator.empty. Subclassing exercises every default via a small inline concrete impl.
SourceOperatorExecutor.scala Overrides: open / close are no-ops; processTuple returns empty iterator; processTupleMultiPort returns empty iterator (never invokes processTuple); onFinishMultiPort delegates to subclass produceTuple() and wraps each emitted tuple with Option.empty port.
ExecFactory.scala newExecFromJavaCode compiles a tiny Java source and constructs the OperatorExecutor; newExecFromJavaClassName finds the no-arg constructor when descString is empty, the (String) constructor when not, and falls back to the (Int, Int) / (String, Int, Int) constructor when NoSuchMethodException is thrown.

Priority

P3 - Low

Task Type

  • Testing / QA

Activity

  1. added theissue type on Jun 6, 2026
  2. added a commit that references this issue on Jun 6, 2026
    57640a7
  3. added a commit that references this issue on Jun 22, 2026
    7ee01dc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions