=str,doc #17993 explain how to use pipeto and dispatcher in docs
This commit is contained in:
parent
f34a684564
commit
1c27e749b1
1 changed files with 6 additions and 2 deletions
|
|
@ -11,7 +11,6 @@ import scala.util._
|
|||
import scala.concurrent.duration._
|
||||
import scala.concurrent._
|
||||
import akka.testkit.TestProbe
|
||||
import akka.pattern.pipe
|
||||
import akka.pattern
|
||||
|
||||
class StreamTestKitDocSpec extends AkkaSpec {
|
||||
|
|
@ -30,6 +29,9 @@ class StreamTestKitDocSpec extends AkkaSpec {
|
|||
|
||||
"grouped part of infinite stream" in {
|
||||
//#grouped-infinite
|
||||
import system.dispatcher
|
||||
import akka.pattern.pipe
|
||||
|
||||
val sourceUnderTest = Source.repeat(1).map(_ * 2)
|
||||
|
||||
val future = sourceUnderTest.grouped(10).runWith(Sink.head)
|
||||
|
|
@ -49,8 +51,10 @@ class StreamTestKitDocSpec extends AkkaSpec {
|
|||
}
|
||||
|
||||
"pipe to test probe" in {
|
||||
import system.dispatcher
|
||||
//#pipeto-testprobe
|
||||
import system.dispatcher
|
||||
import akka.pattern.pipe
|
||||
|
||||
val sourceUnderTest = Source(1 to 4).grouped(2)
|
||||
|
||||
val probe = TestProbe()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue