Skip to content

Commit

Permalink
added test for collectHttp
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrutiVerma97 committed Mar 7, 2022
1 parent 3439261 commit 74ac818
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions zio-http/src/test/scala/zhttp/http/HttpSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,13 @@ object HttpSpec extends DefaultRunnableSpec with HExitAssertion {
val c = Http.collect[Int] { case 3 => "C" }
val actual = (a ++ b ++ c).execute(3)
assert(actual)(isFailure(equalTo(100)))
} +
test("should fail with second") {
val a = Http.collectHttp[Int] { case 1 => Http.succeed("A") }
val b = Http.collectHttp[Int] { case 2 => Http.fail(100) }
val c = Http.collectHttp[Int] { case 3 => Http.succeed("C") }
val actual = (a ++ b ++ c).execute(2)
assert(actual)(isFailure(equalTo(100)))
},
) +
suite("asEffect")(
Expand Down

1 comment on commit 74ac818

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 Performance Benchmark:

Concurrency: 256
Requests/sec: 980598.99

Please sign in to comment.