Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiuszkierat committed Dec 23, 2024
1 parent ad42e13 commit 251afae
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ class NettyCatsServerTest extends TestSuite with EitherValues {

val interpreter = new NettyCatsTestServerInterpreter(eventLoopGroup, dispatcher)
val createServerTest = new DefaultCreateServerTest(backend, interpreter)
val ioSleeper: Sleeper[IO] = (duration: FiniteDuration) => IO.sleep(duration)
val ioSleeper: Sleeper[IO] = new Sleeper[IO] {
override def sleep(duration: FiniteDuration): IO[Unit] = IO.sleep(duration)
}
def drainFs2(stream: Fs2Streams[IO]#BinaryStream): IO[Unit] =
stream.compile.drain.void

Expand All @@ -48,15 +50,12 @@ class NettyCatsServerTest extends TestSuite with EitherValues {
) {
override def functionToPipe[A, B](f: A => B): streams.Pipe[A, B] = in => in.map(f)
override def emptyPipe[A, B]: fs2.Pipe[IO, A, B] = _ => fs2.Stream.empty
}
.tests()
}.tests()

IO.pure((tests, eventLoopGroup))
} { case (_, eventLoopGroup) =>
IO.fromFuture(IO.delay(FutureUtil.nettyFutureToScala(eventLoopGroup.shutdownGracefully()): Future[_])).void
}
.map { case (tests, _) => tests }
}

override def testNameFilter: Option[String] = Some("chunked transmission lasts longer than given timeout")
}

0 comments on commit 251afae

Please sign in to comment.