Yicong-Huang opened a new issue, #4505:
URL: https://github.com/apache/texera/issues/4505

   ### Task Summary
   
   `TrivialControlSpec` 
(`amber/src/test/scala/org/apache/texera/amber/engine/architecture/control/TrivialControlSpec.scala`)
 takes ~70s in CI for only 8 simple tests, making it the single slowest spec in 
the Scala test step (~22% of total backend test time).
   
   The bottleneck is in `testControl[T]`:
   
   ```scala
   probe.receiveWhile(5.minutes, 10.seconds) {
     case GetActorRef(...) => ...
     case NetworkMessage(...) => ... flag += 1
     case other => //skip
   }
   ```
   
   `case other` matches every message, so `receiveWhile` never exits via 
partial-function mismatch. Once all expected returns are received, the test 
sits idle for the full 10s `receiveWhile` idle timeout before the loop returns. 
With 8 tests, that's ~80s of pure waiting.
   
   Replacing `receiveWhile` with a manual loop that exits as soon as `flag == 
expectedValues.length` brings the spec from ~71s to ~1s in local runs.
   
   ### Priority
   
   P2 – Medium
   
   ### Task Type
   
   - [x] Refactor / Cleanup
   - [x] Testing / QA


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