Skip to content

Commit

Permalink
Fix more test.Port vs ip4s.Port collisions
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-klass committed Nov 25, 2024
1 parent 626eed2 commit 33673b2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package sttp.tapir.client.tests
import cats.effect._
import cats.effect.std.Queue
import cats.effect.unsafe.implicits.global
import com.comcast.ip4s
import cats.implicits._
import fs2.{Pipe, Stream}
import org.http4s.dsl.io._
Expand Down Expand Up @@ -215,7 +216,7 @@ class HttpServer(port: Port) {
def start(): Unit = {
val (_, _stopServer) = EmberServerBuilder
.default[IO]
.withPort(port)
.withPort(ip4s.Port.fromInt(port).get)
.withHttpWebSocketApp(app)
.build
.allocated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package sttp.tapir.swagger.bundle

import cats.effect.IO
import cats.effect.unsafe.implicits.global
import com.comcast.ip4s.Port
import org.http4s.HttpRoutes
import org.http4s.ember.server.EmberServerBuilder
import org.http4s.server.Router
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package sttp.tapir.perf.http4s

import cats.effect._
import cats.syntax.all._
import com.comcast.ip4s
import fs2._
import fs2.io.file.{Files, Path => Fs2Path}
import org.http4s._
Expand Down Expand Up @@ -111,7 +112,7 @@ object server {
): IO[ServerRunner.KillSwitch] =
EmberServerBuilder
.default[IO]
.withPort(Port)
.withPort(ip4s.Port.fromInt(Port).get)
.withHttpWebSocketApp(wsb => router(wsb).orNotFound)
.withMaxConnections(maxConnections)
.withConnectorPoolSize(connectorPoolSize)
Expand Down

0 comments on commit 33673b2

Please sign in to comment.