pekko/akka-stream-tests/src/test/scala/akka/stream/scaladsl/SourceFromPublisherSpec.scala
Johan Andrén b7d88fba8f
Revert #30195 - Source.fromPublisher does not pick up attributes fix (#31129)
* Revert "Source.fromPublisher does not pick up attributes fix #30076 (#30195)"

This reverts commit a887c63f8a.

* MiMa filters

* Add tests from #31015

* Resolving some conflicts and failures this now triggers
2022-05-06 16:48:51 +02:00

28 lines
846 B
Scala

/*
* Copyright (C) 2021-2022 Lightbend Inc. <https://www.lightbend.com>
*/
package akka.stream.scaladsl
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AsyncWordSpecLike
import akka.actor.ActorSystem
import akka.stream.Attributes
import akka.stream.testkit.TestPublisher
import akka.testkit.TestKit
class SourceFromPublisherSpec
extends TestKit(ActorSystem("source-from-publisher-spec"))
with AsyncWordSpecLike
with Matchers {
"Source.fromPublisher" should {
// https://github.com/akka/akka/pull/31129
"consider 'inputBuffer' attributes in a correct way" in pendingUntilFixed {
val publisher = TestPublisher.probe[Int]()
Source.fromPublisher(publisher).addAttributes(Attributes.inputBuffer(1, 2)).runWith(Sink.ignore)
publisher.expectRequest() should ===(2L)
}
}
}