Skip to content

Commit

Permalink
use renamed operator
Browse files Browse the repository at this point in the history
  • Loading branch information
amitksingh1490 committed Jan 15, 2022
1 parent eaa1d61 commit cce1c05
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions zio-http/src/test/scala/zhttp/http/MiddlewareSpec.scala
Original file line number Diff line number Diff line change
@@ -58,17 +58,17 @@ object MiddlewareSpec extends DefaultRunnableSpec with HExitAssertion {
} +
testM("runBefore") {
val mid = Middleware.identity.runBefore(console.putStrLn("A"))
val app = Http.fromEffect(console.putStrLn("B")) @@ mid
val app = Http.fromZIO(console.putStrLn("B")) @@ mid
assertM(app(()) *> TestConsole.output)(equalTo(Vector("A\n", "B\n")))
} +
testM("runAfter") {
val mid = Middleware.identity.runAfter(console.putStrLn("B"))
val app = Http.fromEffect(console.putStrLn("A")) @@ mid
val app = Http.fromZIO(console.putStrLn("A")) @@ mid
assertM(app(()) *> TestConsole.output)(equalTo(Vector("A\n", "B\n")))
} +
testM("runBefore and runAfter") {
val mid = Middleware.identity.runBefore(console.putStrLn("A")).runAfter(console.putStrLn("C"))
val app = Http.fromEffect(console.putStrLn("B")) @@ mid
val app = Http.fromZIO(console.putStrLn("B")) @@ mid
assertM(app(()) *> TestConsole.output)(equalTo(Vector("A\n", "B\n", "C\n")))
} +
testM("race") {

1 comment on commit cce1c05

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

Please sign in to comment.