Skip to content

Commit

Permalink
Merge pull request #585 from typelevel/update/cats-effect-3.4.0
Browse files Browse the repository at this point in the history
Update cats-effect, cats-effect-testkit to 3.4.0
  • Loading branch information
ahjohannessen authored Nov 14, 2022
2 parents ec7f0c5 + c9d1fbf commit 8f33ab5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ object Dependencies {
val scalaPb = scalapb.compiler.Version.scalapbVersion

val fs2 = "3.3.0"
val catsEffect = "3.3.14"
val catsEffect = "3.4.0"
val ceMunit = "1.0.7"

val sbtProtoc = "1.0.6"
Expand Down
4 changes: 2 additions & 2 deletions runtime/src/main/scala/fs2/grpc/GeneratedCompanion.scala
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ trait GeneratedCompanion[Service[*[_], _]] {
mkMetadata: A => F[Metadata],
clientOptions: ClientOptions
): Resource[F, Service[F, A]] =
Dispatcher[F].map(mkClient[F, A](_, channel, mkMetadata, clientOptions))
Dispatcher.parallel[F].map(mkClient[F, A](_, channel, mkMetadata, clientOptions))

final def mkClientResource[F[_]: Async, A](
channel: Channel,
Expand Down Expand Up @@ -151,7 +151,7 @@ trait GeneratedCompanion[Service[*[_], _]] {
f: Metadata => F[A],
serverOptions: ServerOptions
): Resource[F, ServerServiceDefinition] =
Dispatcher[F].map(service[F, A](_, serviceImpl, f, serverOptions))
Dispatcher.parallel[F].map(service[F, A](_, serviceImpl, f, serverOptions))

final def serviceResource[F[_]: Async, A](
serviceImpl: Service[F, A],
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/test/scala/Fs2GrpcSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Fs2GrpcSuite extends CatsEffectSuite with CatsEffectFunFixtures {
protected def runTest0(name: String)(body: (TestContext, IORuntime, Dispatcher[IO]) => Unit): Unit = {
test(name) {
val (ec: TestContext, r: IORuntime) = createDeterministicRuntime
val dispatcherF = Dispatcher[IO].allocated.unsafeToFuture()(r)
val dispatcherF = Dispatcher.parallel[IO].allocated.unsafeToFuture()(r)
ec.tick()
val (dispatcher, shutdown) = dispatcherF.value.get.get
val fakeDispatcher: Dispatcher[IO] = new Dispatcher[IO] {
Expand Down
8 changes: 4 additions & 4 deletions runtime/src/test/scala/fs2/grpc/client/ClientSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class ClientSuite extends Fs2GrpcSuite {
tc.tick()
assertEquals(result.value, Some(Success(List(1, 2, 3))))
assertEquals(dummy.messagesSent.size, 1)
assertEquals(dummy.requested, 3)
assertEquals(dummy.requested, 2)

}

Expand All @@ -245,7 +245,7 @@ class ClientSuite extends Fs2GrpcSuite {

assertEquals(result.value, Some(Success(List(1, 2))))
assertEquals(dummy.messagesSent.size, 1)
assertEquals(dummy.requested, 2)
assertEquals(dummy.requested, 1)
}

runTest0("stream to streamingToStreaming") { (tc, io, d) =>
Expand Down Expand Up @@ -273,7 +273,7 @@ class ClientSuite extends Fs2GrpcSuite {
tc.tick()
assertEquals(result.value, Some(Success(List(1, 2, 3))))
assertEquals(dummy.messagesSent.size, 5)
assertEquals(dummy.requested, 3)
assertEquals(dummy.requested, 2)

}

Expand Down Expand Up @@ -371,7 +371,7 @@ class ClientSuite extends Fs2GrpcSuite {
Status.INTERNAL
)
assertEquals(dummy.messagesSent.size, 5)
assertEquals(dummy.requested, 3)
assertEquals(dummy.requested, 2)

}

Expand Down

0 comments on commit 8f33ab5

Please sign in to comment.