Fix snippet example in stream-rate doc #21006

Fix #section-buffer by replacing .withAttributes by .addAttributes to avoid overwriting the .async option.

* Update StreamBuffersRateDocTest.java

Fix #section-buffer by replacing .withAttributes by .addAttributes to avoid overwriting the .async option.
This commit is contained in:
Alexandre Tamborrino 2016-07-21 17:35:13 +02:00 committed by Johan Andrén
parent 210c11e85e
commit c8dfa2458d
2 changed files with 2 additions and 2 deletions

View file

@ -30,7 +30,7 @@ class StreamBuffersRateSpec extends AkkaSpec {
//#section-buffer
val section = Flow[Int].map(_ * 2).async
.withAttributes(Attributes.inputBuffer(initial = 1, max = 1)) // the buffer size of this map is 1
.addAttributes(Attributes.inputBuffer(initial = 1, max = 1)) // the buffer size of this map is 1
val flow = section.via(Flow[Int].map(_ / 2)).async // the buffer size of this map is the default
//#section-buffer
}