Merge pull request #18043 from 2m/wip-18012-feedback-2m

=doc #18012 rate transformation doc improvements
This commit is contained in:
Martynas Mickevičius 2015-07-20 17:41:10 +03:00
commit fed1e95b84
3 changed files with 6 additions and 6 deletions

View file

@ -166,4 +166,4 @@ Expand also allows to keep some state between demand requests from the downstrea
.. includecode:: ../../../akka-samples/akka-docs-java-lambda/src/test/java/docs/stream/RateTransformationDocTest.java#expand-drift
Note that all of the elements coming from upstream will go through expand at least once. This means that the output of this flow is going to report a drift of zero if producer if fast enough, of a larger drift otherwise.
Note that all of the elements coming from upstream will go through expand at least once. This means that the output of this flow is going to report a drift of zero if producer is fast enough, or a larger drift otherwise.

View file

@ -51,12 +51,12 @@ class RateTransformationDocSpec extends AkkaSpec {
.mapConcat(identity)
//#conflate-sample
val fut = Source(1 to 10000)
val fut = Source(1 to 1000)
.map(_.toDouble)
.via(sampleFlow)
.runWith(Sink.fold(Seq.empty[Double])(_ :+ _))
val count = Await.result(fut, 100.millis).size
val count = Await.result(fut, 1000.millis).size
}
"expand should repeat last" in {
@ -69,7 +69,7 @@ class RateTransformationDocSpec extends AkkaSpec {
.via(lastFlow)
.grouped(10)
.toMat(Sink.head)(Keep.both)
.run
.run()
probe.sendNext(1.0)
val expanded = Await.result(fut, 100.millis)
@ -88,7 +88,7 @@ class RateTransformationDocSpec extends AkkaSpec {
val (pub, sub) = TestSource.probe[Double]
.via(driftFlow)
.toMat(TestSink.probe[(Double, Int)])(Keep.both)
.run
.run()
sub.request(1)
pub.sendNext(1.0)

View file

@ -166,4 +166,4 @@ Expand also allows to keep some state between demand requests from the downstrea
.. includecode:: code/docs/stream/RateTransformationDocSpec.scala#expand-drift
Note that all of the elements coming from upstream will go through expand at least once. This means that the output of this flow is going to report a drift of zero if producer if fast enough, of a larger drift otherwise.
Note that all of the elements coming from upstream will go through expand at least once. This means that the output of this flow is going to report a drift of zero if producer is fast enough, or a larger drift otherwise.