From 09629b0f29e90c03eaee9cbaf89c5a8ba7720b23 Mon Sep 17 00:00:00 2001 From: "http4s-steward[bot]" <106843772+http4s-steward[bot]@users.noreply.github.com> Date: Tue, 9 Aug 2022 12:56:44 +0000 Subject: [PATCH 01/14] Update fs2-core, fs2-reactive-streams to 3.2.12 in series/0.7 (#716) Co-authored-by: http4s-steward[bot] <106843772+http4s-steward[bot]@users.noreply.github.com> --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index cdbe26a5..59e4859a 100644 --- a/build.sbt +++ b/build.sbt @@ -36,7 +36,7 @@ ThisBuild / mergifyLabelPaths += "docs" -> file("docs") val catsV = "2.8.0" val catsEffectV = "3.3.14" -val fs2V = "3.2.11" +val fs2V = "3.2.12" val scodecV = "1.1.34" val http4sV = "0.23.14" val reactiveStreamsV = "1.0.4" From 0636fc68e206d790ae6dc669c3ad0e182f7880be Mon Sep 17 00:00:00 2001 From: "http4s-steward[bot]" <106843772+http4s-steward[bot]@users.noreply.github.com> Date: Thu, 11 Aug 2022 20:44:25 +0000 Subject: [PATCH 02/14] Update scalafmt-core to 3.5.9 in series/0.7 (#718) Co-authored-by: http4s-steward[bot] <106843772+http4s-steward[bot]@users.noreply.github.com> --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index d375d523..98455c4a 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version=3.5.8 +version=3.5.9 runner.dialect = scala212 style = default From 918768670e32cb5bc6f0dca062ca813d4c11228c Mon Sep 17 00:00:00 2001 From: "http4s-steward[bot]" <106843772+http4s-steward[bot]@users.noreply.github.com> Date: Wed, 24 Aug 2022 00:13:25 +0200 Subject: [PATCH 03/14] Update http4s-client, ... to 0.23.15 in series/0.7 (#719) Co-authored-by: http4s-steward[bot] <106843772+http4s-steward[bot]@users.noreply.github.com> --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 59e4859a..9a1df629 100644 --- a/build.sbt +++ b/build.sbt @@ -38,7 +38,7 @@ val catsV = "2.8.0" val catsEffectV = "3.3.14" val fs2V = "3.2.12" val scodecV = "1.1.34" -val http4sV = "0.23.14" +val http4sV = "0.23.15" val reactiveStreamsV = "1.0.4" val vaultV = "3.2.1" val caseInsensitiveV = "1.2.0" From f7b4b985ae9a2e78c70069ad916096e553cdf84f Mon Sep 17 00:00:00 2001 From: "http4s-steward[bot]" <106843772+http4s-steward[bot]@users.noreply.github.com> Date: Sat, 27 Aug 2022 11:34:27 +0200 Subject: [PATCH 04/14] Update case-insensitive to 1.3.0 in series/0.7 (#722) Co-authored-by: http4s-steward[bot] <106843772+http4s-steward[bot]@users.noreply.github.com> --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 9a1df629..3fa65ab2 100644 --- a/build.sbt +++ b/build.sbt @@ -41,7 +41,7 @@ val scodecV = "1.1.34" val http4sV = "0.23.15" val reactiveStreamsV = "1.0.4" val vaultV = "3.2.1" -val caseInsensitiveV = "1.2.0" +val caseInsensitiveV = "1.3.0" val munitV = "0.7.29" val munitCatsEffectV = "1.0.7" From 181599d34932c761ffb6c54ad3467e21283f02e2 Mon Sep 17 00:00:00 2001 From: "http4s-steward[bot]" <106843772+http4s-steward[bot]@users.noreply.github.com> Date: Tue, 6 Sep 2022 16:43:10 +0000 Subject: [PATCH 05/14] Update fs2-core, fs2-reactive-streams to 3.2.13 in series/0.7 (#725) Co-authored-by: http4s-steward[bot] <106843772+http4s-steward[bot]@users.noreply.github.com> --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 3fa65ab2..36428f4b 100644 --- a/build.sbt +++ b/build.sbt @@ -36,7 +36,7 @@ ThisBuild / mergifyLabelPaths += "docs" -> file("docs") val catsV = "2.8.0" val catsEffectV = "3.3.14" -val fs2V = "3.2.12" +val fs2V = "3.2.13" val scodecV = "1.1.34" val http4sV = "0.23.15" val reactiveStreamsV = "1.0.4" From 5d87ddc78b2f61560af536f21aa72f8dd89ebd83 Mon Sep 17 00:00:00 2001 From: "http4s-steward[bot]" <106843772+http4s-steward[bot]@users.noreply.github.com> Date: Wed, 7 Sep 2022 12:59:58 +0000 Subject: [PATCH 06/14] Update fs2-core, fs2-reactive-streams to 3.2.14 in series/0.7 (#727) Co-authored-by: http4s-steward[bot] <106843772+http4s-steward[bot]@users.noreply.github.com> --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 36428f4b..30a3a70e 100644 --- a/build.sbt +++ b/build.sbt @@ -36,7 +36,7 @@ ThisBuild / mergifyLabelPaths += "docs" -> file("docs") val catsV = "2.8.0" val catsEffectV = "3.3.14" -val fs2V = "3.2.13" +val fs2V = "3.2.14" val scodecV = "1.1.34" val http4sV = "0.23.15" val reactiveStreamsV = "1.0.4" From ecbda5bd07b4cba7921039370a93fccf8e86a4a0 Mon Sep 17 00:00:00 2001 From: "http4s-steward[bot]" <106843772+http4s-steward[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 15:14:01 +0200 Subject: [PATCH 07/14] Update fs2-core, fs2-reactive-streams to 3.3.0 in series/0.7 (#729) Co-authored-by: http4s-steward[bot] <106843772+http4s-steward[bot]@users.noreply.github.com> --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 30a3a70e..30345c48 100644 --- a/build.sbt +++ b/build.sbt @@ -36,7 +36,7 @@ ThisBuild / mergifyLabelPaths += "docs" -> file("docs") val catsV = "2.8.0" val catsEffectV = "3.3.14" -val fs2V = "3.2.14" +val fs2V = "3.3.0" val scodecV = "1.1.34" val http4sV = "0.23.15" val reactiveStreamsV = "1.0.4" From 0f03823b6a1790c182cd09b8e3e88df46288ecfc Mon Sep 17 00:00:00 2001 From: "http4s-steward[bot]" <106843772+http4s-steward[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 18:45:24 +0200 Subject: [PATCH 08/14] Update vault to 3.3.0 in series/0.7 (#731) Co-authored-by: http4s-steward[bot] <106843772+http4s-steward[bot]@users.noreply.github.com> --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 30345c48..c488cf1e 100644 --- a/build.sbt +++ b/build.sbt @@ -40,7 +40,7 @@ val fs2V = "3.3.0" val scodecV = "1.1.34" val http4sV = "0.23.15" val reactiveStreamsV = "1.0.4" -val vaultV = "3.2.1" +val vaultV = "3.3.0" val caseInsensitiveV = "1.3.0" val munitV = "0.7.29" From 77ea0eb3ceaf91ef1823bcb20cfef3163d32c4db Mon Sep 17 00:00:00 2001 From: "http4s-steward[bot]" <106843772+http4s-steward[bot]@users.noreply.github.com> Date: Fri, 16 Sep 2022 08:34:45 +0000 Subject: [PATCH 09/14] Update http4s-client, ... to 0.23.16 in series/0.7 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index c488cf1e..7858941e 100644 --- a/build.sbt +++ b/build.sbt @@ -38,7 +38,7 @@ val catsV = "2.8.0" val catsEffectV = "3.3.14" val fs2V = "3.3.0" val scodecV = "1.1.34" -val http4sV = "0.23.15" +val http4sV = "0.23.16" val reactiveStreamsV = "1.0.4" val vaultV = "3.3.0" val caseInsensitiveV = "1.3.0" From ba8b51f2fad000c3e06141c9bf5f3cc118080d9a Mon Sep 17 00:00:00 2001 From: "http4s-steward[bot]" <106843772+http4s-steward[bot]@users.noreply.github.com> Date: Fri, 16 Sep 2022 11:31:16 +0200 Subject: [PATCH 10/14] Update sbt-http4s-org to 0.14.5 in series/0.7 (#735) Co-authored-by: http4s-steward[bot] <106843772+http4s-steward[bot]@users.noreply.github.com> --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 35e9ddd5..42a36297 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,2 +1,2 @@ -addSbtPlugin("org.http4s" % "sbt-http4s-org" % "0.14.4") +addSbtPlugin("org.http4s" % "sbt-http4s-org" % "0.14.5") addSbtPlugin("org.typelevel" % "sbt-typelevel-mergify" % "0.4.13") From 53222e4abe39cd1d6b97a04c822f82727fa75b17 Mon Sep 17 00:00:00 2001 From: "http4s-steward[bot]" <106843772+http4s-steward[bot]@users.noreply.github.com> Date: Fri, 16 Sep 2022 11:49:32 +0200 Subject: [PATCH 11/14] Update sbt-typelevel-mergify to 0.4.14 in series/0.7 (#733) --- .github/workflows/ci.yml | 2 +- project/plugins.sbt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81a495cf..b2ad8eb3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -88,7 +88,7 @@ jobs: key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - name: Check that workflows are up to date - run: sbt '++${{ matrix.scala }}' 'project /' githubWorkflowCheck + run: sbt githubWorkflowCheck - name: Check headers and formatting if: matrix.java == 'temurin@11' diff --git a/project/plugins.sbt b/project/plugins.sbt index 42a36297..dcbb3ebb 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,2 +1,2 @@ addSbtPlugin("org.http4s" % "sbt-http4s-org" % "0.14.5") -addSbtPlugin("org.typelevel" % "sbt-typelevel-mergify" % "0.4.13") +addSbtPlugin("org.typelevel" % "sbt-typelevel-mergify" % "0.4.14") From 705ed67f657a28798c4d4f235b39a45a5a936b0e Mon Sep 17 00:00:00 2001 From: "http4s-steward[bot]" <106843772+http4s-steward[bot]@users.noreply.github.com> Date: Sat, 17 Sep 2022 13:22:03 +0200 Subject: [PATCH 12/14] Update scala-library to 2.12.17 in series/0.7 (#737) * Update scala-library to 2.12.17 in series/0.7 * Regenerate GitHub Actions workflow Executed command: sbt githubWorkflowGenerate Co-authored-by: http4s-steward[bot] <106843772+http4s-steward[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 10 +++++----- .mergify.yml | 2 +- build.sbt | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2ad8eb3..3b3da0da 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,10 +29,10 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - scala: [2.12.16, 2.13.8, 3.1.3] + scala: [2.12.17, 2.13.8, 3.1.3] java: [temurin@11, temurin@17] exclude: - - scala: 2.12.16 + - scala: 2.12.17 java: temurin@17 - scala: 3.1.3 java: temurin@17 @@ -188,12 +188,12 @@ jobs: ~/Library/Caches/Coursier/v1 key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} - - name: Download target directories (2.12.16) + - name: Download target directories (2.12.17) uses: actions/download-artifact@v2 with: - name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.16 + name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.17 - - name: Inflate target directories (2.12.16) + - name: Inflate target directories (2.12.17) run: | tar xf targets.tar rm targets.tar diff --git a/.mergify.yml b/.mergify.yml index a665eb67..ce951f88 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -10,7 +10,7 @@ pull_request_rules: conditions: - author=http4s-steward[bot] - body~=labels:.*early-semver-patch - - status-success=Build and Test (ubuntu-latest, 2.12.16, temurin@11) + - status-success=Build and Test (ubuntu-latest, 2.12.17, temurin@11) - status-success=Build and Test (ubuntu-latest, 2.13.8, temurin@11) - status-success=Build and Test (ubuntu-latest, 2.13.8, temurin@17) - status-success=Build and Test (ubuntu-latest, 3.1.3, temurin@11) diff --git a/build.sbt b/build.sbt index c488cf1e..5f27d49e 100644 --- a/build.sbt +++ b/build.sbt @@ -73,7 +73,7 @@ val coreDeps = Seq( )).map(_ % Test) val scala213 = "2.13.8" -ThisBuild / crossScalaVersions := Seq("2.12.16", scala213, "3.1.3") +ThisBuild / crossScalaVersions := Seq("2.12.17", scala213, "3.1.3") ThisBuild / scalaVersion := scala213 ThisBuild / tlBaseVersion := "0.7" ThisBuild / startYear := Some(2019) From 9f3bddd65a3a77dfb0055dfbf17e44f5fd27f30b Mon Sep 17 00:00:00 2001 From: amesgen Date: Sat, 17 Sep 2022 13:42:37 +0200 Subject: [PATCH 13/14] Update to munit-1.0.0-M6 --- build.sbt | 6 +- .../jdkhttpclient/JdkHttpClientSpec.scala | 16 +- .../jdkhttpclient/JdkWSClientSpec.scala | 177 +++++++++--------- 3 files changed, 98 insertions(+), 101 deletions(-) diff --git a/build.sbt b/build.sbt index 7858941e..cb6e0a2d 100644 --- a/build.sbt +++ b/build.sbt @@ -43,8 +43,8 @@ val reactiveStreamsV = "1.0.4" val vaultV = "3.3.0" val caseInsensitiveV = "1.3.0" -val munitV = "0.7.29" -val munitCatsEffectV = "1.0.7" +val munitV = "1.0.0-M6" +val munitCatsEffectV = "2.0.0-M3" val javaWebsocketV = "1.5.3" val blazeServer = Seq( @@ -69,7 +69,7 @@ val coreDeps = Seq( "org.http4s" %% "http4s-client-testkit" % http4sV, "org.java-websocket" % "Java-WebSocket" % javaWebsocketV, "org.scalameta" %% "munit" % munitV, - "org.typelevel" %% "munit-cats-effect-3" % munitCatsEffectV + "org.typelevel" %% "munit-cats-effect" % munitCatsEffectV )).map(_ % Test) val scala213 = "2.13.8" diff --git a/core/src/test/scala/org/http4s/jdkhttpclient/JdkHttpClientSpec.scala b/core/src/test/scala/org/http4s/jdkhttpclient/JdkHttpClientSpec.scala index 3677984a..56fbcadb 100644 --- a/core/src/test/scala/org/http4s/jdkhttpclient/JdkHttpClientSpec.scala +++ b/core/src/test/scala/org/http4s/jdkhttpclient/JdkHttpClientSpec.scala @@ -30,14 +30,12 @@ class JdkHttpClientSpec extends ClientRouteTestBattery("JdkHttpClient") { // regression test for https://github.com/http4s/http4s-jdk-http-client/issues/395 test("Don't error with empty body and explicit Content-Length: 0") { - serverClient().flatMap { case (server, client) => - val address = server().addresses.head - val path = GetRoutes.SimplePath - val uri = Uri.fromString(s"http://$address$path").toOption.get - val req: Request[IO] = Request(uri = uri) - .putHeaders(Header.Raw(ci"Content-Length", "0")) - val body = client().expect[String](req) - body.assertEquals("simple path") - } + val address = server().addresses.head + val path = GetRoutes.SimplePath + val uri = Uri.fromString(s"http://$address$path").toOption.get + val req: Request[IO] = Request(uri = uri) + .putHeaders(Header.Raw(ci"Content-Length", "0")) + val body = client().expect[String](req) + body.assertEquals("simple path") } } diff --git a/core/src/test/scala/org/http4s/jdkhttpclient/JdkWSClientSpec.scala b/core/src/test/scala/org/http4s/jdkhttpclient/JdkWSClientSpec.scala index c3febb2f..f10dabad 100644 --- a/core/src/test/scala/org/http4s/jdkhttpclient/JdkWSClientSpec.scala +++ b/core/src/test/scala/org/http4s/jdkhttpclient/JdkWSClientSpec.scala @@ -20,6 +20,7 @@ import cats.effect._ import cats.implicits._ import fs2.Stream import munit.CatsEffectSuite +import munit.catseffect.IOFixture import org.http4s._ import org.http4s.blaze.server.BlazeServerBuilder import org.http4s.client.websocket._ @@ -38,104 +39,102 @@ import scala.concurrent.duration._ class JdkWSClientSpec extends CatsEffectSuite { - val webSocket: Resource[IO, WSClient[IO]] = JdkWSClient.simple[IO] - val echoServer: Resource[IO, Uri] = - BlazeServerBuilder[IO] - .bindAny() - .withHttpWebSocketApp { wsb => - HttpRoutes - .of[IO] { case GET -> Root => wsb.build(identity) } - .orNotFound - } - .resource - .map(s => httpToWsUri(s.baseUri)) + val webSocket: IOFixture[WSClient[IO]] = + ResourceSuiteLocalFixture("webSocket", JdkWSClient.simple[IO]) + val echoServerUri: IOFixture[Uri] = + ResourceSuiteLocalFixture( + "echoServerUri", + BlazeServerBuilder[IO] + .bindAny() + .withHttpWebSocketApp { wsb => + HttpRoutes + .of[IO] { case GET -> Root => wsb.build(identity) } + .orNotFound + } + .resource + .map(s => httpToWsUri(s.baseUri)) + ) - val webSocketFixture: SyncIO[FunFixture[WSClient[IO]]] = - ResourceFixture(webSocket) - val webSocketEchoFixture: SyncIO[FunFixture[(WSClient[IO], Uri)]] = - ResourceFixture((webSocket, echoServer).tupled) + override def munitFixtures: Seq[IOFixture[_]] = List(webSocket, echoServerUri) - webSocketEchoFixture.test("send and receive frames in low-level mode") { - case (webSocket, echoUri) => - webSocket - .connect(WSRequest(echoUri)) - .use { conn => - for { - _ <- conn.send(WSFrame.Text("bar")) - _ <- conn.sendMany(List(WSFrame.Binary(ByteVector(3, 99, 12)), WSFrame.Text("foo"))) - _ <- conn.send(WSFrame.Close(1000, "goodbye")) - recv <- conn.receiveStream.compile.toList - } yield recv - } - .assertEquals( - List( - WSFrame.Text("bar"), - WSFrame.Binary(ByteVector(3, 99, 12)), - WSFrame.Text("foo"), - WSFrame.Close(1000, "goodbye") - ) + test("send and receive frames in low-level mode") { + webSocket() + .connect(WSRequest(echoServerUri())) + .use { conn => + for { + _ <- conn.send(WSFrame.Text("bar")) + _ <- conn.sendMany(List(WSFrame.Binary(ByteVector(3, 99, 12)), WSFrame.Text("foo"))) + _ <- conn.send(WSFrame.Close(1000, "goodbye")) + recv <- conn.receiveStream.compile.toList + } yield recv + } + .assertEquals( + List( + WSFrame.Text("bar"), + WSFrame.Binary(ByteVector(3, 99, 12)), + WSFrame.Text("foo"), + WSFrame.Close(1000, "goodbye") ) + ) } - webSocketEchoFixture.test("send and receive frames in high-level mode") { - case (webSocket, echoUri) => - webSocket - .connectHighLevel(WSRequest(echoUri)) - .use { conn => - for { - _ <- conn.send(WSFrame.Binary(ByteVector(15, 2, 3))) - _ <- conn.sendMany(List(WSFrame.Text("foo"), WSFrame.Text("bar"))) - recv <- conn.receiveStream.take(3).compile.toList - } yield recv - } - .assertEquals( - List( - WSFrame.Binary(ByteVector(15, 2, 3)), - WSFrame.Text("foo"), - WSFrame.Text("bar") - ) + test("send and receive frames in high-level mode") { + webSocket() + .connectHighLevel(WSRequest(echoServerUri())) + .use { conn => + for { + _ <- conn.send(WSFrame.Binary(ByteVector(15, 2, 3))) + _ <- conn.sendMany(List(WSFrame.Text("foo"), WSFrame.Text("bar"))) + recv <- conn.receiveStream.take(3).compile.toList + } yield recv + } + .assertEquals( + List( + WSFrame.Binary(ByteVector(15, 2, 3)), + WSFrame.Text("foo"), + WSFrame.Text("bar") ) + ) } - webSocketEchoFixture.test("group frames by their `last` attribute in high-level mode") { - case (webSocket, echoUri) => - webSocket - .connectHighLevel(WSRequest(echoUri)) - .use { conn => - for { - _ <- conn.sendMany( - List( - WSFrame.Text("1", last = false), - WSFrame.Text("2", last = false), - WSFrame.Text("3"), - WSFrame.Binary(ByteVector(1)), - WSFrame.Binary(ByteVector(2), last = false), - WSFrame.Binary(ByteVector(3), last = false), - WSFrame.Binary(ByteVector(4)), - WSFrame.Text("4", last = false), - WSFrame.Text("5"), - WSFrame.Binary(ByteVector(5), last = false), - WSFrame.Binary(ByteVector(6)), - WSFrame.Text("6"), - WSFrame.Binary(ByteVector(7), last = false) - ) + test("group frames by their `last` attribute in high-level mode") { + webSocket() + .connectHighLevel(WSRequest(echoServerUri())) + .use { conn => + for { + _ <- conn.sendMany( + List( + WSFrame.Text("1", last = false), + WSFrame.Text("2", last = false), + WSFrame.Text("3"), + WSFrame.Binary(ByteVector(1)), + WSFrame.Binary(ByteVector(2), last = false), + WSFrame.Binary(ByteVector(3), last = false), + WSFrame.Binary(ByteVector(4)), + WSFrame.Text("4", last = false), + WSFrame.Text("5"), + WSFrame.Binary(ByteVector(5), last = false), + WSFrame.Binary(ByteVector(6)), + WSFrame.Text("6"), + WSFrame.Binary(ByteVector(7), last = false) ) - recv <- conn.receiveStream.take(6).compile.toList - } yield recv - } - .assertEquals( - List( - WSFrame.Text("123"), - WSFrame.Binary(ByteVector(1)), - WSFrame.Binary(ByteVector(2, 3, 4)), - WSFrame.Text("45"), - WSFrame.Binary(ByteVector(5, 6)), - WSFrame.Text("6") ) + recv <- conn.receiveStream.take(6).compile.toList + } yield recv + } + .assertEquals( + List( + WSFrame.Text("123"), + WSFrame.Binary(ByteVector(1)), + WSFrame.Binary(ByteVector(2, 3, 4)), + WSFrame.Text("45"), + WSFrame.Binary(ByteVector(5, 6)), + WSFrame.Text("6") ) + ) } - webSocketFixture.test("automatically close the connection") { webSocket => + test("automatically close the connection") { val frames = for { ref <- Ref[IO].of(List.empty[WebSocketFrame]) finished <- Deferred[IO, Unit] @@ -154,9 +153,9 @@ class JdkWSClientSpec extends CatsEffectSuite { override def onStart() = { val req = WSRequest(uri"ws://localhost:8080") val p = for { - _ <- webSocket.connect(req).use(conn => conn.send(WSFrame.Text("hi blaze"))) + _ <- webSocket().connect(req).use(conn => conn.send(WSFrame.Text("hi blaze"))) _ <- IO.sleep(1.seconds) - _ <- webSocket.connectHighLevel(req).use { conn => + _ <- webSocket().connectHighLevel(req).use { conn => conn.send(WSFrame.Text("hey blaze")) } _ <- IO.sleep(1.seconds) @@ -178,7 +177,7 @@ class JdkWSClientSpec extends CatsEffectSuite { ) } - webSocketFixture.test("send headers") { webSocket => + test("send headers") { val sentHeaders = Headers( Header.Raw(ci"foo", "bar"), Header.Raw(ci"Sec-Websocket-Protocol", "proto"), @@ -198,7 +197,7 @@ class JdkWSClientSpec extends CatsEffectSuite { } .resource .use { server => - webSocket + webSocket() .connect(WSRequest(httpToWsUri(server.baseUri)).withHeaders(sentHeaders)) .use(_ => IO.unit) } *> ref.get From 8a68d4f500750104c739fb7ac98221186472cb5e Mon Sep 17 00:00:00 2001 From: "http4s-steward[bot]" <106843772+http4s-steward[bot]@users.noreply.github.com> Date: Tue, 20 Sep 2022 12:53:52 +0000 Subject: [PATCH 14/14] Update http4s-client, ... to 1.0.0-M37 in main --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 987497c3..1dad2a5b 100644 --- a/build.sbt +++ b/build.sbt @@ -38,7 +38,7 @@ val catsV = "2.8.0" val catsEffectV = "3.3.14" val fs2V = "3.3.0" val scodecV = "1.1.34" -val http4sV = "1.0.0-M36" +val http4sV = "1.0.0-M37" val reactiveStreamsV = "1.0.4" val vaultV = "3.3.0" val caseInsensitiveV = "1.3.0"