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]:
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
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]:case othermatches every message, soreceiveWhilenever exits via partial-function mismatch. Once all expected returns are received, the test sits idle for the full 10sreceiveWhileidle timeout before the loop returns. With 8 tests, that's ~80s of pure waiting.Replacing
receiveWhilewith a manual loop that exits as soon asflag == expectedValues.lengthbrings the spec from ~71s to ~1s in local runs.Priority
P2 – Medium
Task Type