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

   ### Task Summary
   
   Two worker-side files have no spec at all:
   
   | File | Coverage |
   |---|---|
   | `amber/.../worker/managers/InputPortMaterializationReaderThread.scala` | 
82.5% lines (7 missed + 4 partial of 63) |
   | `amber/.../worker/DataProcessorRPCHandlerInitializer.scala` | 33.3% lines 
(8 missed + 2 partial of 15) |
   
   Both are drivable with no cluster, no Docker and no network. The reader 
thread replays a materialized input port into a worker's channel, so it can be 
exercised against an in-memory buffer; the initializer builds an operator 
executor from a descriptor.
   
   **A third candidate, `ClientActor.scala` (65.2%), should NOT be picked up — 
it is saturated, not undertested.** Its remaining 7 misses are the companion 
object's own `<init>`, four `case class` declaration lines (which carry 112 of 
the file's 176 branches inside scalac-generated 
`equals`/`hashCode`/`productElement`, all with zero covered branches), and two 
structural lines. The reason nothing moves is that the e2e specs 
(`DataProcessingSpec`, `PauseSpec`, …) are **not** tagged `@IntegrationTest`, 
so they run in the coverage job and already drive a real Coordinator through a 
real `ClientActor`. Roughly 190 lines of new test buys 1 line there.
   
   Traps worth knowing:
   
   1. **`newExecFromJavaCode` is uncoverable from a unit test.** 
`JavaRuntimeCompilation.compileCode` calls `compiler.getTask(...)` with null 
options, so system javac uses `java.class.path` — which under sbt (`fork := 
false`) does not contain workflow-core. A UDF implementing `OperatorExecutor` 
cannot compile, so the method never returns normally and JaCoCo's probe sits 
after the call. `CoreExecutorReflectionSpec:245-256` documents the same 
constraint.
   2. **`noOperation` is dead on the Scala path.** `NoOperation` is produced 
and consumed only by the Python worker (`backpressure_handler.py:54`, 
`no_operation_handler.py`); no Scala caller exists. The other three `???` 
members have live coordinator-side call sites but resolve to `???` on a Scala 
worker — testing them would cement "unimplemented" as a contract.
   3. **A mutation anchor that collides with existing text silently 
contaminates every later run.** Replacing a receiver check with `.nonEmpty` 
collides with a nearby `buffer.nonEmpty`; the revert's exactly-once assertion 
then refuses to fire and leaves the mutant applied. Always assert the anchor is 
unique, and diff the production file after every revert.
   
   ### Task Type
   
   - [ ] Refactor / Cleanup
   - [ ] DevOps / Deployment / CI
   - [x] Testing / QA
   - [ ] Documentation
   - [ ] Performance
   - [ ] Other
   


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