From b1ec854b8cf62aaca524a61e075274bc42bf4c4a Mon Sep 17 00:00:00 2001 From: "He-Pin(kerr)" Date: Sat, 20 Jan 2024 05:01:57 +0800 Subject: [PATCH] chore: Fix FlowCollectWhileSpec. #985 --- .../apache/pekko/stream/scaladsl/FlowCollectWhileSpec.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowCollectWhileSpec.scala b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowCollectWhileSpec.scala index fd119853a2..7647016cff 100644 --- a/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowCollectWhileSpec.scala +++ b/stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/FlowCollectWhileSpec.scala @@ -61,7 +61,7 @@ class FlowCollectWhileSpec extends StreamSpec with ScriptedTest { "restart when pf throws" in { Source(1 to 6) - .collect { case x: Int => if (x % 2 == 0) throw TE("") else x } + .collectWhile { case x: Int => if (x % 2 == 0) throw TE("") else x } .withAttributes(supervisionStrategy(restartingDecider)) .runWith(TestSink[Int]()) .request(1) @@ -76,7 +76,7 @@ class FlowCollectWhileSpec extends StreamSpec with ScriptedTest { "resume when pf throws" in { Source(1 to 6) - .collect { case x: Int => if (x % 2 == 0) throw TE("") else x } + .collectWhile { case x: Int => if (x % 2 == 0) throw TE("") else x } .withAttributes(supervisionStrategy(resumingDecider)) .runWith(TestSink[Int]()) .request(1)