Repository: scala-steward-org/scala-steward
Pull request #2911 (2023-01-11 01:46:21)

Use ember server for tests
Since blaze is schismed, it may lag on the milestone releases, but ember is in sync with core.

codecov[bot]: # [Codecov](https://codecov.io/gh/scala-steward-org/scala-steward/pull/2911?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scala-steward-org) Report
Base: **89.69**% // Head: **89.69**% // No change to project coverage :thumbsup:
> Coverage data is based on head [(`50d2534`)](https://codecov.io/gh/scala-steward-org/scala-steward/pull/2911?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scala-steward-org) compared to base [(`0c67b21`)](https://codecov.io/gh/scala-steward-org/scala-steward/commit/0c67b217a2be800d1dd77f39c9eabb226144353a?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scala-steward-org).
> Patch has no changes to coverable lines.

<details><summary>Additional details and impacted files</summary>


```diff
@@           Coverage Diff           @@
##             main    #2911   +/-   ##
=======================================
  Coverage   89.69%   89.69%           
=======================================
  Files         158      158           
  Lines        3038     3038           
  Branches      200      200           
=======================================
  Hits         2725     2725           
  Misses        313      313           
```



Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scala-steward-org). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scala-steward-org)

</details>

[:umbrella: View full report at Codecov](https://codecov.io/gh/scala-steward-org/scala-steward/pull/2911?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scala-steward-org).   
:loudspeaker: Do you have feedback about the report comment? [Let us know in this issue](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scala-steward-org).


Patch:
diff --git a/build.sbt b/build.sbt
index 7391a636..1f3b1b84 100644
--- a/build.sbt
+++ b/build.sbt
@@ -137,7 +137,7 @@ lazy val core = myCrossProject("core")
       Dependencies.circeLiteral % Test,
       Dependencies.disciplineMunit % Test,
       Dependencies.http4sDsl % Test,
-      Dependencies.http4sBlazeServer % Test,
+      Dependencies.http4sEmberServer % Test,
       Dependencies.munit % Test,
       Dependencies.munitCatsEffect % Test,
       Dependencies.munitScalacheck % Test,
diff --git a/project/Dependencies.scala b/project/Dependencies.scala
index 6c319ad8..5fb0bb48 100644
--- a/project/Dependencies.scala
+++ b/project/Dependencies.scala
@@ -24,7 +24,7 @@ object Dependencies {
   val http4sCirce = "org.http4s" %% "http4s-circe" % http4sCore.revision
   val http4sClient = "org.http4s" %% "http4s-client" % http4sCore.revision
   val http4sDsl = "org.http4s" %% "http4s-dsl" % http4sCore.revision
-  val http4sBlazeServer = "org.http4s" %% "http4s-blaze-server" % "1.0.0-M38"
+  val http4sEmberServer = "org.http4s" %% "http4s-ember-server" % http4sCore.revision
   val http4sJdkhttpClient = "org.http4s" %% "http4s-jdk-http-client" % "1.0.0-M8"
   val log4catsSlf4j = "org.typelevel" %% "log4cats-slf4j" % "2.5.0"
   val logbackClassic = "ch.qos.logback" % "logback-classic" % "1.4.5"


Test patch:
diff --git a/modules/core/src/test/scala/org/scalasteward/core/client/ClientConfigurationTest.scala b/modules/core/src/test/scala/org/scalasteward/core/client/ClientConfigurationTest.scala
index 93183ff6..94abc080 100644
--- a/modules/core/src/test/scala/org/scalasteward/core/client/ClientConfigurationTest.scala
+++ b/modules/core/src/test/scala/org/scalasteward/core/client/ClientConfigurationTest.scala
@@ -11,6 +11,8 @@ import org.typelevel.ci._
 import eu.timepit.refined.auto._
 import eu.timepit.refined.types.numeric.PosInt
 
+import scala.concurrent.duration._
+
 class ClientConfigurationTest extends CatsEffectSuite {
 
   private val userAgentValue = "my-user-agent"
@@ -71,7 +73,7 @@ class ClientConfigurationTest extends CatsEffectSuite {
 
   test("disableFollowRedirect does not follow redirect") {
     import org.http4s.Method._
-    import org.http4s.blaze.server._
+    import org.http4s.ember.server._
     import org.http4s.client.dsl.io._
 
     val regularClient = ClientConfiguration.build[IO](
@@ -83,7 +85,11 @@ class ClientConfigurationTest extends CatsEffectSuite {
       ClientConfiguration.setUserAgent(dummyUserAgent)
     )
     val getServer =
-      BlazeServerBuilder[IO].bindAny("localhost").withHttpApp(routes.orNotFound).resource
+      EmberServerBuilder
+        .default[IO]
+        .withShutdownTimeout(1.second)
+        .withHttpApp(routes.orNotFound)
+        .build
 
     val test = (regularClient, disabledClient, getServer).tupled.use {
       case (regClient, disClient, s) =>