tck issue or bug, onSubscribe should be called prior to onComplete always (#24582)

This commit is contained in:
Konrad `ktoso` Malawski 2018-03-07 13:05:14 +09:00 committed by GitHub
parent 2df4898f53
commit d55990fa64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,32 @@
/**
* Copyright (C) 2014-2018 Lightbend Inc. <https://www.lightbend.com>
*/
package akka.stream.tck
import akka.stream.ActorMaterializer
import akka.stream.scaladsl.Flow
import org.reactivestreams.Processor
import org.testng.annotations.Test
class EmptyProcessorTest extends AkkaIdentityProcessorVerification[Int] {
@Test
@throws[Throwable]
def reproduce(): Unit = {
var i = 0
while (i < 100000) {
System.out.println("Run " + i)
this.required_spec109_mustIssueOnSubscribeForNonNullSubscriber()
i += 1
}
}
override def createIdentityProcessor(maxBufferSize: Int): Processor[Int, Int] = {
implicit val materializer = ActorMaterializer()(system)
Flow[Int].toProcessor.run()
}
override def createElement(element: Int): Int = element
}