Skip to content

Commit

Permalink
rewrote nonZIO app in serverSpec using collectHExit
Browse files Browse the repository at this point in the history
  • Loading branch information
dinobabujohn committed Feb 9, 2022
1 parent 3f8c282 commit 19f6069
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zio-http/src/test/scala/zhttp/service/ServerSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ object ServerSpec extends HttpRunnableSpec {
}

// Use this route to test anything that doesn't require ZIO related computations.
private val nonZIO = Http.collectHttp[Request] {
case _ -> !! / "HExitSuccess" => Http.ok
case _ -> !! / "HExitFailure" => Http.fail(new RuntimeException("FAILURE"))
private val nonZIO = Http.collectHExit[Request] {
case _ -> !! / "HExitSuccess" => HExit.succeed(Response.ok)
case _ -> !! / "HExitFailure" => HExit.fail(new RuntimeException("FAILURE"))
}

private val app = serve { nonZIO ++ staticApp ++ DynamicServer.app }
Expand Down

1 comment on commit 19f6069

@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: 925846.12

Please sign in to comment.