From 2fa2766cb1c8cd9e551314c95dae409a0cc16563 Mon Sep 17 00:00:00 2001 From: "Yu Nishiyama (a.k.a Richard)" Date: Tue, 4 Jul 2017 16:15:34 +0900 Subject: [PATCH] No need to test attribute propagation in LazySourceSpec (Fixes #23065) (#23178) --- .../akka/stream/scaladsl/LazySourceSpec.scala | 25 ------------------- 1 file changed, 25 deletions(-) diff --git a/akka-stream-tests/src/test/scala/akka/stream/scaladsl/LazySourceSpec.scala b/akka-stream-tests/src/test/scala/akka/stream/scaladsl/LazySourceSpec.scala index c91d7d9fd0..3dcfe4309c 100644 --- a/akka-stream-tests/src/test/scala/akka/stream/scaladsl/LazySourceSpec.scala +++ b/akka-stream-tests/src/test/scala/akka/stream/scaladsl/LazySourceSpec.scala @@ -91,31 +91,6 @@ class LazySourceSpec extends StreamSpec with DefaultTimeout with ScalaFutures { outProbe.expectError() shouldEqual TE("OMG Who set that on fire!?!") } - val attributesSource = Source.fromGraph( - new GraphStage[SourceShape[Attributes]] { - val out = Outlet[Attributes]("AttributesSource.out") - override val shape: SourceShape[Attributes] = SourceShape(out) - override def createLogic(inheritedAttributes: Attributes): GraphStageLogic = new GraphStageLogic(shape) with OutHandler { - override def onPull(): Unit = { - push(out, inheritedAttributes) - completeStage() - } - setHandler(out, this) - } - }) - - "propagate attributes to inner streams" in assertAllStagesStopped { - val f = Source.single(attributesSource.addAttributes(Attributes.name("inner"))) - .flatMapMerge(1, identity) - .addAttributes(Attributes.name("outer")) - .runWith(Sink.head) - - val attributes = f.futureValue.attributeList - attributes should contain(Attributes.Name("inner")) - attributes should contain(Attributes.Name("outer")) - attributes.indexOf(Attributes.Name("inner")) < attributes.indexOf(Attributes.Name("outer")) should be(true) - } - "fail correctly when materialization of inner source fails" in assertAllStagesStopped { val matFail = TE("fail!") object FailingInnerMat extends GraphStage[SourceShape[String]] {