parent
d7b45e0fc3
commit
e6e476d82a
146 changed files with 910 additions and 740 deletions
|
|
@ -138,7 +138,7 @@ abstract class CoderSpec extends WordSpec with CodecSpecSupport with Inspectors
|
|||
ByteString(Array.fill(size)(1.toByte))
|
||||
|
||||
val sizesAfterRoundtrip =
|
||||
Source(() ⇒ sizes.toIterator.map(createByteString))
|
||||
Source.fromIterator(() ⇒ sizes.toIterator.map(createByteString))
|
||||
.via(Coder.encoderFlow)
|
||||
.via(Coder.decoderFlow)
|
||||
.runFold(Seq.empty[Int])(_ :+ _.size)
|
||||
|
|
@ -186,5 +186,5 @@ abstract class CoderSpec extends WordSpec with CodecSpecSupport with Inspectors
|
|||
input.via(Coder.decoderFlow).join.awaitResult(3.seconds)
|
||||
|
||||
def decodeFromIterator(iterator: () ⇒ Iterator[ByteString]): ByteString =
|
||||
Await.result(Source(iterator).via(Coder.decoderFlow).join, 3.seconds)
|
||||
Await.result(Source.fromIterator(iterator).via(Coder.decoderFlow).join, 3.seconds)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ class CodingDirectivesSpec extends RoutingSpec with Inside {
|
|||
() ⇒ text.grouped(8).map { chars ⇒
|
||||
Chunk(chars.mkString): ChunkStreamPart
|
||||
}
|
||||
val chunkedTextEntity = HttpEntity.Chunked(ContentTypes.`text/plain(UTF-8)`, Source(textChunks))
|
||||
val chunkedTextEntity = HttpEntity.Chunked(ContentTypes.`text/plain(UTF-8)`, Source.fromIterator(textChunks))
|
||||
|
||||
Post() ~> `Accept-Encoding`(gzip) ~> {
|
||||
encodeResponseWith(Gzip) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue