Inner stages of lazy/future stages should inherit attributes (#30161)
* Add tests for attributes inheritance * Fix inheritance bugs revealed by tests
This commit is contained in:
parent
fe1459fcbc
commit
e714f7bdbc
6 changed files with 87 additions and 17 deletions
|
|
@ -28,9 +28,7 @@ import akka.stream.impl.QueueSink.Output
|
|||
import akka.stream.impl.QueueSink.Pull
|
||||
import akka.stream.impl.Stages.DefaultAttributes
|
||||
import akka.stream.impl.StreamLayout.AtomicModule
|
||||
import akka.stream.scaladsl.Sink
|
||||
import akka.stream.scaladsl.SinkQueueWithCancel
|
||||
import akka.stream.scaladsl.Source
|
||||
import akka.stream.scaladsl.{ Keep, Sink, SinkQueueWithCancel, Source }
|
||||
import akka.stream.stage._
|
||||
import akka.util.ccompat._
|
||||
|
||||
|
|
@ -590,7 +588,8 @@ import akka.util.ccompat._
|
|||
|
||||
val subOutlet = new SubSourceOutlet[T]("LazySink")
|
||||
|
||||
val matVal = Source.fromGraph(subOutlet.source).runWith(sink)(interpreter.subFusingMaterializer)
|
||||
val matVal = interpreter.subFusingMaterializer
|
||||
.materialize(Source.fromGraph(subOutlet.source).toMat(sink)(Keep.right), inheritedAttributes)
|
||||
|
||||
def maybeCompleteStage(): Unit = {
|
||||
if (isClosed(in) && subOutlet.isClosed) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue