Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to http4s-server-1.0.0-M38 #780

Merged
merged 2 commits into from
Jan 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ final class BlazeClientBuilder[F[_]] private (
*/
def resourceWithState: Resource[F, (Client[F], BlazeClientState[F])] =
for {
dispatcher <- Dispatcher[F]
dispatcher <- Dispatcher.parallel[F]
scheduler <- scheduler
_ <- Resource.eval(verifyAllTimeoutsAccuracy(scheduler))
_ <- Resource.eval(verifyTimeoutRelations())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ trait BlazeClientBase extends CatsEffectSuite {

private def makeScaffold(num: Int, secure: Boolean): Resource[IO, ServerScaffold[IO]] =
for {
dispatcher <- Dispatcher[IO]
dispatcher <- Dispatcher.parallel[IO]
getHandler <- Resource.eval(
RoutesToHandlerAdapter(
HttpRoutes.of[IO] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Http1ClientStageSuite extends CatsEffectSuite with DispatcherIOFixture {
private val fooConnection =
ResourceFunFixture[Http1Connection[IO]] {
for {
dispatcher <- Dispatcher[IO]
dispatcher <- Dispatcher.parallel[IO]
connection <- mkConnection(FooRequestKey, dispatcher)
} yield connection
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ package client

import cats.effect._
import cats.effect.std._
import cats.implicits._
import com.comcast.ip4s._
import fs2.Stream
import munit.CatsEffectSuite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ import munit.CatsEffectSuite

trait DispatcherIOFixture { this: CatsEffectSuite =>

def dispatcher: SyncIO[FunFixture[Dispatcher[IO]]] = ResourceFunFixture(Dispatcher[IO])
def dispatcher: SyncIO[FunFixture[Dispatcher[IO]]] = ResourceFunFixture(Dispatcher.parallel[IO])

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package org.http4s.blaze.core.websocket

import cats.effect.IO
import cats.effect.std.Random
import cats.effect.std.SecureRandom
import munit.CatsEffectSuite

class WebSocketHandshakeSuite extends CatsEffectSuite {
Expand All @@ -30,7 +30,7 @@ class WebSocketHandshakeSuite extends CatsEffectSuite {

test("WebSocketHandshake should do a round trip") {
for {
random <- Random.javaSecuritySecureRandom[IO]
random <- SecureRandom.javaSecuritySecureRandom[IO]
client <- WebSocketHandshake.clientHandshaker[IO]("www.foo.com", random)
hs = client.initHeaders
valid <- WebSocketHandshake.serverHandshake[IO](hs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ class BlazeServerBuilder[F[_]] private (
for {
// blaze doesn't have graceful shutdowns, which means it may continue to submit effects,
// ever after the server has acknowledged shutdown, so we just need to allocate
dispatcher <- Resource.eval(Dispatcher[F].allocated.map(_._1))
dispatcher <- Resource.eval(Dispatcher.parallel[F].allocated.map(_._1))
scheduler <- tickWheelResource

_ <- Resource.eval(verifyTimeoutRelations())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Http1ServerStageSpec extends CatsEffectSuite {
def apply() = d

override def beforeAll(): IO[Unit] =
Dispatcher[IO].allocated.map { case (dispatcher, cancelation) =>
Dispatcher.parallel[IO].allocated.map { case (dispatcher, cancelation) =>
shutdown = cancelation
d = dispatcher
}
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Dependencies._

val Scala213 = "2.13.10"
val Scala3 = "3.2.1"
val http4sVersion = "1.0.0-M37"
val http4sVersion = "1.0.0-M38"
val munitCatsEffectVersion = "2.0.0-M3"

ThisBuild / resolvers +=
Expand Down