You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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) {
caseGetActorRef(...) => ...
caseNetworkMessage(...) => ... flag +=1case 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.
Activity
perf(amber): exit TrivialControlSpec receiveWhile early (#4506)
perf(amber): exit TrivialControlSpec receiveWhile early (apache#4506)