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:
drewhk 2015-06-23 18:11:41 +02:00
commit e6f2db127c

View file

@ -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)
}
}
}