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

   ### What changes were proposed in this PR?
   
   Adds `WorkerManagersAdditionalSpec` covering the two stateful manager 
classes in `worker/managers/` that previously had no unit coverage.
   
   | Surface | Pinned |
   | --- | --- |
   | `StatisticsManager` default state | All counters / time accumulators 
initialize to zero; `getStatistics` returns empty input/output metrics. |
   | `StatisticsManager.increaseInputStatistics` / `increaseOutputStatistics` | 
Per-port count + size accumulation; `require(size >= 0)` rejects negative 
sizes. |
   | `StatisticsManager` time accumulators | `increaseDataProcessingTime` / 
`increaseControlProcessingTime` reject negative time; 
`initializeWorkerStartTime` + `updateTotalExecutionTime` compute elapsed since 
start; `idleTime = total − dataProcessing − controlProcessing`; 
`updateTotalExecutionTime` rejects times earlier than `workerStartTime`; 
zero-elapsed boundary accepted. |
   | `SerializationManager.restoreExecutorState` | `IllegalStateException` when 
`actorId` is a non-worker identity (controller id triggers the guard); 
`OpExecWithClassName` dispatches through 
`ExecFactory.newExecFromJavaClassName`; `OpExecInitInfo.Empty` raises 
`UnsupportedOperationException`; broken `OpExecWithCode` surfaces via the 
`JavaRuntimeCompilation` diagnostic path; non-`CheckpointSupport` executor 
produces an empty restoration iterator; `CheckpointSupport` executor delegates 
to `deserializeState` (verified via a sentinel in the returned iterator). |
   | `SerializationManager.registerSerialization` / `applySerialization` | 
Callback invoked exactly once; re-applying without re-registering is a safe 
no-op; re-registering after applying honors the new callback 
(fire-once-then-clear contract). |
   
   No production code changed; this is test-only.
   
   ### Any related issues, documentation, discussions?
   
   Closes #5436
   
   ### How was this PR tested?
   
   ```
   sbt "WorkflowExecutionService/Test/testOnly 
org.apache.texera.amber.engine.architecture.worker.managers.WorkerManagersAdditionalSpec"
   # → 20 tests, all pass
   
   sbt "WorkflowExecutionService/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]

Reply via email to