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

   ### Task Summary
   
   
`amber/src/main/scala/org/apache/texera/amber/engine/common/AmberRuntime.scala` 
has **no spec**. It owns the actor system the rest of amber leans on, the 
serialization extension every message passes through, and the scheduling 
helpers services use for recurring work — and none of it is verified.
   
   Most of it is drivable with no cluster, which is the part worth knowing: 
`startActorWorker(None)` builds its whole system with artery on **port 0** in 
under 100 ms, makes no network call, leaves 
`ClusterListener.numWorkerNodesInCluster` at 0, and tears down again. So the 
entire `ComputingUnitWorker` startup path — the seed-node URI, the master 
address, the artery host binding, the config fallback chain, and the two child 
actors — can be asserted directly.
   
   Two regions are genuinely out of reach and should be left alone: 
`getNodeIpAddress` and `startActorMaster`, which bind real network interfaces.
   
   **The overriding constraint.** amber sets neither `Test / fork` nor `Test / 
parallelExecution := false`, so every amber suite shares one JVM — and this 
file *is* the JVM-global state (`_actorSystem`, `_serde`, 
`AmberConfig.masterNodeAddr`) that other suites depend on. Any spec here must 
save and restore those by reflection, as about eight sibling specs already do, 
terminate everything it starts, and be **run alongside other runtime-touching 
suites to prove it**.
   
   Three traps, each of which produces an assertion that looks strong and pins 
nothing:
   
   1. **`pekko.remote.artery.transport == "tcp"` is pekko's own 
`reference.conf` default.** Asserting it holds even if `pekkoConfig` is dropped 
from the fallback chain entirely. Assert something only `cluster.conf` supplies 
— the kryo serializer binding, for instance.
   2. **`AmberConfig.masterNodeAddr`'s default already equals the value a test 
would expect** (`Address("pekko", "Amber", "localhost", 2552)`). Without 
pre-seeding a sentinel, deleting the production write leaves the assertion 
green.
   3. **Comparing a system's *name* is not comparing the system.** A serde 
built over a different `ActorSystem("Amber", …)` satisfies a name check, so the 
identity has to be compared with `eq`.
   
   Also worth knowing when measuring: `pekko.remote.artery.canonical.port = 0` 
is already in `cluster.conf`, so the production override of it is unobservable 
— do not write a test for that line.
   
   ### 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