From 6a0c2a6955e2cfa2bcc18af437ef95469f926cb1 Mon Sep 17 00:00:00 2001 From: Chord Date: Fri, 13 Dec 2019 13:46:21 -0500 Subject: [PATCH] Pass flaky VehicleSpawnControl*Test using delay --- .../src/test/scala/actor/objects/VehicleSpawnPadTest.scala | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pslogin/src/test/scala/actor/objects/VehicleSpawnPadTest.scala b/pslogin/src/test/scala/actor/objects/VehicleSpawnPadTest.scala index 7d54c8db..43f8f812 100644 --- a/pslogin/src/test/scala/actor/objects/VehicleSpawnPadTest.scala +++ b/pslogin/src/test/scala/actor/objects/VehicleSpawnPadTest.scala @@ -224,6 +224,12 @@ object VehicleSpawnPadControlTest { } zone.Actor = system.actorOf(Props(classOf[ZoneActor], zone), s"test-zone-${System.nanoTime()}") zone.Actor ! Zone.Init() + + // Hack: Wait for the Zone to finish booting, otherwise later tests will fail randomly due to race conditions + // with actor probe setting + // TODO(chord): Remove when Zone supports notification of booting being complete + Thread.sleep(5000) + vehicle.Actor = system.actorOf(Props(classOf[VehicleControl], vehicle), s"vehicle-control-${System.nanoTime()}") val pad = VehicleSpawnPad(GlobalDefinitions.mb_pad_creation)