Skip to content

add unit test coverage for worker manager classes (StatisticsManager + SerializationManager) #5436

Closed

Description

@aglinxinyuan

Two small stateful manager classes in amber/.../engine/architecture/worker/managers/, neither covered today.

Surface Behavior to pin
StatisticsManager Default zero state across all counters / accumulators; increaseInputStatistics / increaseOutputStatistics accumulate per-port count and size; require(size >= 0, ...) rejects negative sizes; getInputTupleCount / getOutputTupleCount sum across ports; getStatistics projects to WorkerStatistics (with idle time = total − dataProcessing − controlProcessing); increaseDataProcessingTime / increaseControlProcessingTime reject negative time; initializeWorkerStartTime + updateTotalExecutionTime together compute elapsed time, and updateTotalExecutionTime rejects times before workerStartTime.
SerializationManager setOpInitialization records the InitializeExecutorRequest; restoreExecutorState requires actorId be a worker (not controller) and throws IllegalStateException otherwise; on OpExecWithClassName it instantiates via ExecFactory.newExecFromJavaClassName; on unsupported OpExecInitInfo it throws UnsupportedOperationException; non-CheckpointSupport executors return an empty restoration iterator. registerSerialization records a callback; applySerialization invokes it once and clears it (idempotent on second call).

Priority

P3 - Low

Task Type

  • Testing / QA

Activity

  1. added theissue type on Jun 7, 2026
  2. added a commit that references this issue on Jun 7, 2026
    e987f13
  3. added a commit that references this issue on Jun 22, 2026
    f382e6b
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