The problem is that when we initiate an ActorMaterializer, automatically akka create a StreamSupervisor (using user guardian) and if something wrong happening during initialization of ConstructrMachine( for example a prob on the configuration), we have a deadlocking.
I mean ConstructrExtension will wait for the shutdown of StreamSupervisor and but StreamSupervisor will never die.
First, this implicit
ActorMaterializer
look not be used. After removing itEverything compile
Test is green
Then that can create a deadlock if problem during
ConstructrMachine
initialization.ConstructrExtension use
system.systemActorOf(Constructr.props, Constructr.Name)
So it will use the System Guardian which wait for the shutdown of all "normal" actor before initiate its own shut-down. (cf https://doc.akka.io/docs/akka/current/general/supervision.html?language=scala#system-the-system-guardian)
The problem is that when we initiate an ActorMaterializer, automatically akka create a
StreamSupervisor
(usinguser guardian
) and if something wrong happening during initialization ofConstructrMachine
( for example a prob on the configuration), we have a deadlocking. I meanConstructrExtension
will wait for the shutdown ofStreamSupervisor
and butStreamSupervisor
will never die.