@@ -19,7 +19,7 @@ package org.apache.openwhisk.core.containerpool.v2.test
1919
2020import org .apache .pekko .actor .FSM .{CurrentState , SubscribeTransitionCallBack , Transition }
2121import org .apache .pekko .actor .{ActorRef , ActorRefFactory , ActorSystem }
22- import org .apache .pekko .testkit .{ImplicitSender , TestActor , TestFSMRef , TestKit , TestProbe }
22+ import org .apache .pekko .testkit .{ImplicitSender , TestFSMRef , TestKit , TestProbe }
2323import common .StreamLogging
2424import org .apache .openwhisk .common .InvokerState .{Healthy , Offline , Unhealthy }
2525import org .apache .openwhisk .common .{Enable , GracefulShutdown , RingBuffer }
@@ -331,26 +331,13 @@ class InvokerHealthManagerTests
331331 instanceId.tags,
332332 instanceId.dedicatedNamespaces).serialize))
333333
334- val mockHealthActionProxy = TestProbe ()
335-
336- mockHealthActionProxy.setAutoPilot((sender, msg) =>
337- msg match {
338- case _ : Initialize =>
339- (1 to InvokerHealthManager .bufferSize - InvokerHealthManager .bufferErrorTolerance) foreach { _ =>
340- sender ! HealthMessage (true )
341- }
342- TestActor .KeepRunning
343-
344- case GracefulShutdown =>
345- TestActor .KeepRunning
346- })
347-
348- fsm.underlyingActor.healthActionProxy = Some (mockHealthActionProxy.ref)
349-
350334 fsm ! Enable
335+ (1 to InvokerHealthManager .bufferSize - InvokerHealthManager .bufferErrorTolerance) foreach { _ =>
336+ fsm ! HealthMessage (true )
337+ }
351338
352339 probe.expectMsg(Transition (fsm, Offline , Unhealthy ))
353- probe.expectMsg(10 .seconds, Transition (fsm, Unhealthy , Healthy ))
340+ probe.expectMsg(Transition (fsm, Unhealthy , Healthy ))
354341
355342 dataManagementService.expectMsg(
356343 UpdateDataOnChange (
0 commit comments