=str 21732 rewrite file souce with NIO and GraphStagу

add MiMa excludes and additional test

add benchmark and move eclusions to 2.5.4

add future completion on stream termination
This commit is contained in:
Alexander Golubev 2016-09-21 23:42:27 +02:00 committed by Patrik Nordwall
parent e57cab6c85
commit 000ed93576
7 changed files with 259 additions and 164 deletions

View file

@ -48,6 +48,19 @@ class SinkAsJavaStreamSpec extends StreamSpec(UnboundedMailboxConfig) {
javaSource.close()
}
"allow overriding the dispatcher using Attributes" in Utils.assertAllStagesStopped {
val sys = ActorSystem("dispatcher-testing", UnboundedMailboxConfig)
val materializer = ActorMaterializer()(sys)
try {
TestSource.probe[ByteString].runWith(StreamConverters.asJavaStream()
.addAttributes(ActorAttributes.dispatcher("akka.actor.default-dispatcher")))(materializer)
materializer.asInstanceOf[PhasedFusingActorMaterializer].supervisor.tell(StreamSupervisor.GetChildren, testActor)
val ref = expectMsgType[Children].children.find(_.path.toString contains "asJavaStream").get
assertDispatcher(ref, "akka.actor.default-dispatcher")
} finally shutdown(sys)
}
"work in separate IO dispatcher" in Utils.assertAllStagesStopped {
val sys = ActorSystem("dispatcher-testing", UnboundedMailboxConfig)
val materializer = ActorMaterializer()(sys)