- Switches from using size-of-1/2 Vectors to using Lists - Fixes an issue where processorForNode wouldn't use the dispatcher form the settings - Adds a dedicated Collect fusion op - Adds various simplifications to ActorBasedFlowMaterializer - Adds FIXMEs where appropriate - Switches `grouped` to use a VectorBuilder - Adds support for `scan` - ActorBasedFlowMaterializer now uses Iterator instead of head+tail decomp on Seqs - Identity and Completed Transformers are now cached - Adds dedicated AstNodes for all combinators - Adds a hook-in point for fusion in `ActorBasedFlowMaterializer` - Adds support for `Operate` an AstNode with a function that create a fusing.Op - Adds experimental and slow optimizer as a PoC - Adds verification that Ast.Fused does not exist in optimizer input
22 lines
No EOL
609 B
Scala
22 lines
No EOL
609 B
Scala
/**
|
|
* Copyright (C) 2014 Typesafe Inc. <http://www.typesafe.com>
|
|
*/
|
|
package akka.stream.tck
|
|
|
|
import scala.collection.immutable
|
|
import akka.stream.scaladsl.Sink
|
|
import akka.stream.scaladsl.Source
|
|
import org.reactivestreams._
|
|
|
|
class IterablePublisherTest extends AkkaPublisherVerification[Int] {
|
|
|
|
def createPublisher(elements: Long): Publisher[Int] = {
|
|
val iterable: immutable.Iterable[Int] =
|
|
if (elements == Long.MaxValue)
|
|
new immutable.Iterable[Int] { override def iterator = Iterator from 0 }
|
|
else
|
|
0 until elements.toInt
|
|
|
|
Source(iterable).runWith(Sink.publisher)
|
|
}
|
|
} |