From a136f8b0aa6765ca8905ad4c9cc317671feee08e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Antonsson?= Date: Thu, 30 May 2013 12:00:50 +0200 Subject: [PATCH] Change workSchedule time to avoid SupervisorHierarchySpec running slow. See #3312 The analysis has shown the following: * when it happens, no work is outstanding, the supervisor hierarchy is in a quiet state * test completes normally in 20s, one observed outlier at 33s and two failures which can be extrapolated to 75s and 59s * timings can be reproduced on a notebook by inserting Thread.slee(p) in Hierarchy.preRestart * what happens then is that the FSM backs off (with 250ms timer), bursts work, backs off, etc. * setting the back-off timeout to 50ms reduces runtime from 50s to 20s on the notebook Preliminary conclusion is that this is an artifact of the test procedure. No indication was seen of corruption or indefinitely suspending actor or any other incorrect behavior. --- .../src/test/scala/akka/actor/SupervisorHierarchySpec.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/akka-actor-tests/src/test/scala/akka/actor/SupervisorHierarchySpec.scala b/akka-actor-tests/src/test/scala/akka/actor/SupervisorHierarchySpec.scala index d779587e64..b3be0064da 100644 --- a/akka-actor-tests/src/test/scala/akka/actor/SupervisorHierarchySpec.scala +++ b/akka-actor-tests/src/test/scala/akka/actor/SupervisorHierarchySpec.scala @@ -470,7 +470,7 @@ object SupervisorHierarchySpec { setTimer("phase", StateTimeout, 50.seconds.dilated, false) } - val workSchedule = 250.millis + val workSchedule = 50.millis private def random012: Int = Random.nextFloat match { case x if x > 0.1 ⇒ 0