chore: Fix FlowCollectWhileSpec. #985

This commit is contained in:
He-Pin(kerr) 2024-01-20 05:01:57 +08:00 committed by GitHub
parent 7b2a3d8c27
commit b1ec854b8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)