Merge pull request #17812 from drewhk/wip-test-props-materialization-exception-drewhk
add extra test using broken Props in actorPublisher
This commit is contained in:
commit
e6f2db127c
1 changed files with 10 additions and 1 deletions
|
|
@ -1,9 +1,10 @@
|
|||
package akka.stream
|
||||
|
||||
import akka.actor.Props
|
||||
import akka.stream.impl.{ StreamSupervisor, ActorFlowMaterializerImpl }
|
||||
import akka.stream.scaladsl.{ Sink, Source }
|
||||
import akka.stream.testkit.AkkaSpec
|
||||
import akka.testkit.{ ImplicitSender, TestProbe }
|
||||
import akka.testkit.{ TestActor, ImplicitSender, TestProbe }
|
||||
|
||||
import scala.concurrent.Await
|
||||
import scala.concurrent.duration._
|
||||
|
|
@ -49,6 +50,14 @@ class ActorMaterializerSpec extends AkkaSpec with ImplicitSender {
|
|||
expectNoMsg(1.second)
|
||||
}
|
||||
|
||||
"handle properly broken Props" in {
|
||||
val m = ActorFlowMaterializer.create(system)
|
||||
an[IllegalArgumentException] should be thrownBy
|
||||
Await.result(
|
||||
Source.actorPublisher(Props(classOf[TestActor], "wrong", "arguments")).runWith(Sink.head)(m),
|
||||
3.seconds)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue