Skip to content

Commit

Permalink
Code compiles and example booksSttpClient4Example works
Browse files Browse the repository at this point in the history
  • Loading branch information
amorfis committed Jan 24, 2025
1 parent 5680878 commit 2ccf35b
Show file tree
Hide file tree
Showing 47 changed files with 335 additions and 143 deletions.
1 change: 1 addition & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2158,6 +2158,7 @@ lazy val examples: ProjectMatrix = (projectMatrix in file("examples"))
picklerJson,
prometheusMetrics,
sttpClient,
sttpClient4,
sttpMockServer,
sttpStubServer,
swaggerUiBundle,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,66 +1,61 @@
package sttp.tapir.client.sttp
package sttp.tapir.client.sttp4

import sttp.capabilities.Streams
import sttp.client4._
import sttp.client4.ws.async
import sttp.model._
import sttp.shared.Identity
import sttp.tapir.Codec.PlainCodec
import sttp.tapir._
import sttp.tapir.Codec.PlainCodec
import sttp.tapir.client.ClientOutputParams
import sttp.tapir.internal._
import sttp.ws.WebSocket

import java.io.ByteArrayInputStream
import java.io.{ByteArrayInputStream, InputStream}
import java.nio.ByteBuffer
import scala.annotation.tailrec

private[sttp] class EndpointToSttpClient[R](clientOptions: SttpClientOptions, wsToPipe: WebSocketToPipe[R])
extends EndpointToSttpClientExtensions {
def toSttpRequest[A, E, O, I](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri]): A => I => Request[DecodeResult[Either[E, O]], R] = {
aParams => iParams =>
val (uri1, req1) =
setInputParams(
e.securityInput,
ParamsAsAny(aParams),
baseUri.getOrElse(Uri(None, None, Uri.EmptyPath, Nil, None)),
basicRequest.asInstanceOf[PartialAnyRequest]
)

val (uri2, req2) =
setInputParams(
e.input,
ParamsAsAny(iParams),
uri1,
req1
)

val req3: RequestT[Identity, _, _] =
req2.copy(
method = sttp.model.Method(e.method.getOrElse(Method.GET).method): Identity[Method],
uri = uri2: Identity[Uri]
)

val isWebSocket = bodyIsWebSocket(e.output)

def isSuccess(meta: ResponseMetadata) = if (isWebSocket) meta.code == webSocketSuccessStatusCode else meta.isSuccess

val responseAs = fromMetadata(
responseAsFromOutputs(e.errorOutput, isWebSocket = false),
ConditionalResponseAs(isSuccess, responseAsFromOutputs(e.output, isWebSocket))
).mapWithMetadata { (body, meta) =>
val output = if (isSuccess(meta)) e.output else e.errorOutput
val params = clientOutputParams(output, body, meta)
params.map(_.asAny).map(p => if (isSuccess(meta)) Right(p) else Left(p))
}.map {
case DecodeResult.Error(o, e) =>
DecodeResult.Error(o, new IllegalArgumentException(s"Cannot decode from: $o, request: ${req3.method} ${req3.uri}", e))
case other => other
}
def toSttpRequest[A, E, O, I](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri]): A => I => Request[DecodeResult[Either[E, O]]] = { aParams => iParams =>
val (uri1, req1) =
setInputParams(
e.securityInput,
ParamsAsAny(aParams),
baseUri.getOrElse(Uri(None, None, Uri.EmptyPath, Nil, None)),
basicRequest.asInstanceOf[PartialAnyRequest]
)

val (uri2, req2) =
setInputParams(
e.input,
ParamsAsAny(iParams),
uri1,
req1
)

val req3 = req2.method(sttp.model.Method(e.method.getOrElse(Method.GET).method), uri2)

val isWebSocket = bodyIsWebSocket(e.output)

def isSuccess(meta: ResponseMetadata) = if (isWebSocket) meta.code == webSocketSuccessStatusCode else meta.isSuccess

val responseAs = fromMetadata(
responseAsFromOutputs(e.errorOutput, isWebSocket = false),
ConditionalResponseAs(isSuccess, responseAsFromOutputs(e.output, isWebSocket))
).mapWithMetadata { (body, meta) =>
val output = if (isSuccess(meta)) e.output else e.errorOutput
val params = clientOutputParams(output, body, meta)
params.map(_.asAny).map(p => if (isSuccess(meta)) Right(p) else Left(p))
}.map {
case DecodeResult.Error(o, e) =>
DecodeResult.Error(o, new IllegalArgumentException(s"Cannot decode from: $o, request: ${req3.method} ${req3.uri}", e))
case other => other
}

req3.response(responseAs).asInstanceOf[Request[DecodeResult[Either[E, O]], R]]
req3.response(responseAs).asInstanceOf[Request[DecodeResult[Either[E, O]]]]
}

private type PartialAnyRequest = PartialRequest[_, _]
private type PartialAnyRequest = PartialRequest[_]

@tailrec
private def setInputParams[I](
Expand Down Expand Up @@ -100,11 +95,11 @@ private[sttp] class EndpointToSttpClient[R](clientOptions: SttpClientOptions, ws
EndpointIO.OneOfBodyVariant(_, Right(EndpointIO.StreamBodyWrapper(StreamBodyIO(streams, _, _, _, _)))) :: _,
_
) =>
val req2 = req.streamBody(streams)(value.asInstanceOf[streams.BinaryStream])
val req2 = req.body(value.asInstanceOf[InputStream])
(uri, req2)
case EndpointIO.OneOfBody(Nil, _) => throw new RuntimeException("One of body without variants")
case EndpointIO.StreamBodyWrapper(StreamBodyIO(streams, _, _, _, _)) =>
val req2 = req.streamBody(streams)(value.asInstanceOf[streams.BinaryStream])
val req2 = req.body(value.asInstanceOf[InputStream])

Check failure on line 102 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.12-JVM-11

sttp.tapir.client.sttp4.SttpClientStreamingTests ► Endpoint(securityin: -, in: POST /api /echo {body as stream}, errout: -, out: {body as stream})

Failed test found in: client/sttp-client4/target/jvm-2.12/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientStreamingTests.xml Error: java.lang.ClassCastException: class fs2.Stream cannot be cast to class java.io.InputStream (fs2.Stream is in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149; java.io.InputStream is in module java.base of loader 'bootstrap')
Raw output
java.lang.ClassCastException: class fs2.Stream cannot be cast to class java.io.InputStream (fs2.Stream is in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149; java.io.InputStream is in module java.base of loader 'bootstrap')
	at sttp.tapir.client.sttp4.EndpointToSttpClient.setInputParams(EndpointToSttpClient.scala:102)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.handleInputPair(EndpointToSttpClient.scala:143)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.setInputParams(EndpointToSttpClient.scala:126)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:33)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientTests.send(SttpClientTests.scala:29)
	at sttp.tapir.client.tests.ClientStreamingTests.$anonfun$streamingTests$1(ClientStreamingTests.scala:14)
	at org.scalatest.AsyncTestSuite.$anonfun$transformToOutcome$1(AsyncTestSuite.scala:240)
	at org.scalatest.funsuite.AsyncFunSuiteLike$$anon$1.apply(AsyncFunSuiteLike.scala:207)
	at org.scalatest.AsyncTestSuite.withFixture(AsyncTestSuite.scala:316)
	at org.scalatest.AsyncTestSuite.withFixture$(AsyncTestSuite.scala:315)
	at org.scalatest.funsuite.AsyncFunSuite.withFixture(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.invokeWithAsyncFixture$1(AsyncFunSuiteLike.scala:205)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$runTest$1(AsyncFunSuiteLike.scala:219)
	at org.scalatest.AsyncSuperEngine.runTestImpl(AsyncEngine.scala:374)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest(AsyncFunSuiteLike.scala:219)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest$(AsyncFunSuiteLike.scala:199)
	at org.scalatest.funsuite.AsyncFunSuite.runTest(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$runTests$1(AsyncFunSuiteLike.scala:252)
	at org.scalatest.AsyncSuperEngine.$anonfun$runTestsInBranch$1(AsyncEngine.scala:432)
	at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126)
	at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:122)
	at scala.collection.immutable.List.foldLeft(List.scala:91)
	at org.scalatest.AsyncSuperEngine.traverseSubNodes$1(AsyncEngine.scala:406)
	at org.scalatest.AsyncSuperEngine.runTestsInBranch(AsyncEngine.scala:487)
	at org.scalatest.AsyncSuperEngine.runTestsImpl(AsyncEngine.scala:555)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests(AsyncFunSuiteLike.scala:252)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests$(AsyncFunSuiteLike.scala:251)
	at org.scalatest.funsuite.AsyncFunSuite.runTests(AsyncFunSuite.scala:2192)
	at org.scalatest.Suite.run(Suite.scala:1114)
	at org.scalatest.Suite.run$(Suite.scala:1096)
	at org.scalatest.funsuite.AsyncFunSuite.org$scalatest$funsuite$AsyncFunSuiteLike$$super$run(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$run$1(AsyncFunSuiteLike.scala:256)
	at org.scalatest.AsyncSuperEngine.runImpl(AsyncEngine.scala:625)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run(AsyncFunSuiteLike.scala:256)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run$(AsyncFunSuiteLike.scala:255)
	at sttp.tapir.client.tests.ClientTests.org$scalatest$BeforeAndAfterAll$$super$run(ClientTests.scala:15)
	at org.scalatest.BeforeAndAfterAll.liftedTree1$1(BeforeAndAfterAll.scala:213)
	at org.scalatest.BeforeAndAfterAll.run(BeforeAndAfterAll.scala:210)
	at org.scalatest.BeforeAndAfterAll.run$(BeforeAndAfterAll.scala:208)
	at sttp.tapir.client.tests.ClientTests.run(ClientTests.scala:15)
	at org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:321)
	at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:517)
	at sbt.TestRunner.runTest$1(TestFramework.scala:153)
	at sbt.TestRunner.run(TestFramework.scala:168)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.$anonfun$apply$1(TestFramework.scala:336)
	at sbt.TestFramework$.sbt$TestFramework$$withContextLoader(TestFramework.scala:296)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFunction.apply(TestFramework.scala:348)
	at sbt.Tests$.processRunnable$1(Tests.scala:475)
	at sbt.Tests$.$anonfun$makeSerial$1(Tests.scala:481)
	at sbt.std.Transform$$anon$3.$anonfun$apply$2(Transform.scala:47)
	at sbt.std.Transform$$anon$4.work(Transform.scala:69)
	at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
	at sbt.Execute.work(Execute.scala:292)
	at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

Check failure on line 102 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.12-JVM-11

sttp.tapir.client.sttp4.SttpClientStreamingZioTests ► Endpoint(securityin: -, in: POST /api /echo {body as stream}, errout: -, out: {body as stream})

Failed test found in: client/sttp-client4/target/jvm-2.12/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientStreamingZioTests.xml Error: java.lang.ClassCastException: class zio.stream.ZStream cannot be cast to class java.io.InputStream (zio.stream.ZStream is in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149; java.io.InputStream is in module java.base of loader 'bootstrap')
Raw output
java.lang.ClassCastException: class zio.stream.ZStream cannot be cast to class java.io.InputStream (zio.stream.ZStream is in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149; java.io.InputStream is in module java.base of loader 'bootstrap')
	at sttp.tapir.client.sttp4.EndpointToSttpClient.setInputParams(EndpointToSttpClient.scala:102)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.handleInputPair(EndpointToSttpClient.scala:143)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.setInputParams(EndpointToSttpClient.scala:126)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:33)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientZioTests.$anonfun$send$1(SttpClientZioTests.scala:31)
	at delay @ sttp.tapir.client.sttp4.SttpClientZioTests.send(SttpClientZioTests.scala:26)
	at fromFuture @ sttp.tapir.client.tests.ClientTests.doAdjust$1(ClientTests.scala:33)
	at map @ sttp.tapir.client.tests.ClientStreamingTests.$anonfun$streamingTests$1(ClientStreamingTests.scala:15)
	at map @ sttp.tapir.client.tests.ClientStreamingTests.$anonfun$streamingTests$1(ClientStreamingTests.scala:16)
	at map @ sttp.tapir.client.tests.ClientStreamingTests.$anonfun$streamingTests$1(ClientStreamingTests.scala:17)

Check failure on line 102 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 3-JVM-11

sttp.tapir.client.sttp4.SttpClientStreamingTests ► Endpoint(securityin: -, in: POST /api /echo {body as stream}, errout: -, out: {body as stream})

Failed test found in: client/sttp-client4/target/jvm-3/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientStreamingTests.xml Error: java.lang.ClassCastException: class fs2.Stream cannot be cast to class java.io.InputStream (fs2.Stream is in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe; java.io.InputStream is in module java.base of loader 'bootstrap')
Raw output
java.lang.ClassCastException: class fs2.Stream cannot be cast to class java.io.InputStream (fs2.Stream is in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe; java.io.InputStream is in module java.base of loader 'bootstrap')
	at sttp.tapir.client.sttp4.EndpointToSttpClient.setInputParams(EndpointToSttpClient.scala:102)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.handleInputPair(EndpointToSttpClient.scala:143)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.setInputParams(EndpointToSttpClient.scala:126)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.toSttpRequest$$anonfun$1$$anonfun$1(EndpointToSttpClient.scala:33)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.toSecureRequestThrowDecodeFailures$$anonfun$1$$anonfun$1(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientTests.send(SttpClientTests.scala:29)
	at sttp.tapir.client.tests.ClientStreamingTests.testFun$proxy1$1(ClientStreamingTests.scala:14)
	at sttp.tapir.client.tests.ClientStreamingTests.streamingTests$$anonfun$1(ClientStreamingTests.scala:13)
	at org.scalatest.AsyncTestSuite.transformToOutcome$$anonfun$1(AsyncTestSuite.scala:240)
	at org.scalatest.funsuite.AsyncFunSuiteLike$$anon$1.apply(AsyncFunSuiteLike.scala:187)
	at org.scalatest.AsyncTestSuite.withFixture(AsyncTestSuite.scala:316)
	at org.scalatest.AsyncTestSuite.withFixture$(AsyncTestSuite.scala:214)
	at org.scalatest.funsuite.AsyncFunSuite.withFixture(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.invokeWithAsyncFixture$1(AsyncFunSuiteLike.scala:193)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest$$anonfun$1(AsyncFunSuiteLike.scala:199)
	at org.scalatest.AsyncSuperEngine.runTestImpl(AsyncEngine.scala:374)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest(AsyncFunSuiteLike.scala:199)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest$(AsyncFunSuiteLike.scala:47)
	at org.scalatest.funsuite.AsyncFunSuite.runTest(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests$$anonfun$1(AsyncFunSuiteLike.scala:232)
	at org.scalatest.AsyncSuperEngine.traverseSubNodes$1$$anonfun$1(AsyncEngine.scala:432)
	at scala.collection.LinearSeqOps.foldLeft(LinearSeq.scala:183)
	at scala.collection.LinearSeqOps.foldLeft$(LinearSeq.scala:179)
	at scala.collection.immutable.List.foldLeft(List.scala:79)
	at org.scalatest.AsyncSuperEngine.traverseSubNodes$1(AsyncEngine.scala:469)
	at org.scalatest.AsyncSuperEngine.runTestsInBranch(AsyncEngine.scala:487)
	at org.scalatest.AsyncSuperEngine.runTestsImpl(AsyncEngine.scala:555)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests(AsyncFunSuiteLike.scala:232)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests$(AsyncFunSuiteLike.scala:47)
	at org.scalatest.funsuite.AsyncFunSuite.runTests(AsyncFunSuite.scala:2192)
	at org.scalatest.Suite.run(Suite.scala:1114)
	at org.scalatest.Suite.run$(Suite.scala:564)
	at org.scalatest.funsuite.AsyncFunSuite.org$scalatest$funsuite$AsyncFunSuiteLike$$super$run(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run$$anonfun$1(AsyncFunSuiteLike.scala:236)
	at org.scalatest.AsyncSuperEngine.runImpl(AsyncEngine.scala:625)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run(AsyncFunSuiteLike.scala:236)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run$(AsyncFunSuiteLike.scala:47)
	at sttp.tapir.client.tests.ClientTests.org$scalatest$BeforeAndAfterAll$$super$run(ClientTests.scala:15)
	at org.scalatest.BeforeAndAfterAll.liftedTree1$1(BeforeAndAfterAll.scala:213)
	at org.scalatest.BeforeAndAfterAll.run(BeforeAndAfterAll.scala:217)
	at org.scalatest.BeforeAndAfterAll.run$(BeforeAndAfterAll.scala:135)
	at sttp.tapir.client.tests.ClientTests.run(ClientTests.scala:15)
	at org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:321)
	at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:517)
	at sbt.TestRunner.runTest$1(TestFramework.scala:153)
	at sbt.TestRunner.run(TestFramework.scala:168)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.$anonfun$apply$1(TestFramework.scala:336)
	at sbt.TestFramework$.sbt$TestFramework$$withContextLoader(TestFramework.scala:296)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFunction.apply(TestFramework.scala:348)
	at sbt.Tests$.processRunnable$1(Tests.scala:475)
	at sbt.Tests$.$anonfun$makeSerial$1(Tests.scala:481)
	at sbt.std.Transform$$anon$3.$anonfun$apply$2(Transform.scala:47)
	at sbt.std.Transform$$anon$4.work(Transform.scala:69)
	at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
	at sbt.Execute.work(Execute.scala:292)
	at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

Check failure on line 102 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 3-JVM-11

sttp.tapir.client.sttp4.SttpClientStreamingZioTests ► Endpoint(securityin: -, in: POST /api /echo {body as stream}, errout: -, out: {body as stream})

Failed test found in: client/sttp-client4/target/jvm-3/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientStreamingZioTests.xml Error: java.lang.ClassCastException: class zio.stream.ZStream cannot be cast to class java.io.InputStream (zio.stream.ZStream is in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe; java.io.InputStream is in module java.base of loader 'bootstrap')
Raw output
java.lang.ClassCastException: class zio.stream.ZStream cannot be cast to class java.io.InputStream (zio.stream.ZStream is in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe; java.io.InputStream is in module java.base of loader 'bootstrap')
	at sttp.tapir.client.sttp4.EndpointToSttpClient.setInputParams(EndpointToSttpClient.scala:102)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.handleInputPair(EndpointToSttpClient.scala:143)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.setInputParams(EndpointToSttpClient.scala:126)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.toSttpRequest$$anonfun$1$$anonfun$1(EndpointToSttpClient.scala:33)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.toSecureRequestThrowDecodeFailures$$anonfun$1$$anonfun$1(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientZioTests.send$$anonfun$1(SttpClientZioTests.scala:31)
	at delay @ sttp.tapir.client.sttp4.SttpClientZioTests.send(SttpClientZioTests.scala:35)
	at fromFuture @ sttp.tapir.client.tests.ClientTests.doAdjust$1(ClientTests.scala:33)
	at map @ sttp.tapir.client.tests.ClientStreamingTests.testFun$proxy1$1(ClientStreamingTests.scala:15)
	at map @ sttp.tapir.client.tests.ClientStreamingTests.testFun$proxy1$1(ClientStreamingTests.scala:16)
	at map @ sttp.tapir.client.tests.ClientStreamingTests.testFun$proxy1$1(ClientStreamingTests.scala:17)

Check failure on line 102 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.13-JVM-11

sttp.tapir.client.sttp4.SttpClientStreamingTests ► Endpoint(securityin: -, in: POST /api /echo {body as stream}, errout: -, out: {body as stream})

Failed test found in: client/sttp-client4/target/jvm-2.13/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientStreamingTests.xml Error: java.lang.ClassCastException: class fs2.Stream cannot be cast to class java.io.InputStream (fs2.Stream is in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1; java.io.InputStream is in module java.base of loader 'bootstrap')
Raw output
java.lang.ClassCastException: class fs2.Stream cannot be cast to class java.io.InputStream (fs2.Stream is in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1; java.io.InputStream is in module java.base of loader 'bootstrap')
	at sttp.tapir.client.sttp4.EndpointToSttpClient.setInputParams(EndpointToSttpClient.scala:102)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.handleInputPair(EndpointToSttpClient.scala:143)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.setInputParams(EndpointToSttpClient.scala:126)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:33)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientTests.send(SttpClientTests.scala:29)
	at sttp.tapir.client.tests.ClientStreamingTests.$anonfun$streamingTests$1(ClientStreamingTests.scala:14)
	at org.scalatest.AsyncTestSuite.$anonfun$transformToOutcome$1(AsyncTestSuite.scala:240)
	at org.scalatest.funsuite.AsyncFunSuiteLike$$anon$1.apply(AsyncFunSuiteLike.scala:207)
	at org.scalatest.AsyncTestSuite.withFixture(AsyncTestSuite.scala:316)
	at org.scalatest.AsyncTestSuite.withFixture$(AsyncTestSuite.scala:315)
	at org.scalatest.funsuite.AsyncFunSuite.withFixture(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.invokeWithAsyncFixture$1(AsyncFunSuiteLike.scala:205)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$runTest$1(AsyncFunSuiteLike.scala:219)
	at org.scalatest.AsyncSuperEngine.runTestImpl(AsyncEngine.scala:374)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest(AsyncFunSuiteLike.scala:219)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest$(AsyncFunSuiteLike.scala:199)
	at org.scalatest.funsuite.AsyncFunSuite.runTest(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$runTests$1(AsyncFunSuiteLike.scala:252)
	at org.scalatest.AsyncSuperEngine.$anonfun$runTestsInBranch$1(AsyncEngine.scala:432)
	at scala.collection.LinearSeqOps.foldLeft(LinearSeq.scala:183)
	at scala.collection.LinearSeqOps.foldLeft$(LinearSeq.scala:179)
	at scala.collection.immutable.List.foldLeft(List.scala:79)
	at org.scalatest.AsyncSuperEngine.traverseSubNodes$1(AsyncEngine.scala:406)
	at org.scalatest.AsyncSuperEngine.runTestsInBranch(AsyncEngine.scala:487)
	at org.scalatest.AsyncSuperEngine.runTestsImpl(AsyncEngine.scala:555)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests(AsyncFunSuiteLike.scala:252)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests$(AsyncFunSuiteLike.scala:251)
	at org.scalatest.funsuite.AsyncFunSuite.runTests(AsyncFunSuite.scala:2192)
	at org.scalatest.Suite.run(Suite.scala:1114)
	at org.scalatest.Suite.run$(Suite.scala:1096)
	at org.scalatest.funsuite.AsyncFunSuite.org$scalatest$funsuite$AsyncFunSuiteLike$$super$run(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$run$1(AsyncFunSuiteLike.scala:256)
	at org.scalatest.AsyncSuperEngine.runImpl(AsyncEngine.scala:625)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run(AsyncFunSuiteLike.scala:256)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run$(AsyncFunSuiteLike.scala:255)
	at sttp.tapir.client.tests.ClientTests.org$scalatest$BeforeAndAfterAll$$super$run(ClientTests.scala:15)
	at org.scalatest.BeforeAndAfterAll.liftedTree1$1(BeforeAndAfterAll.scala:213)
	at org.scalatest.BeforeAndAfterAll.run(BeforeAndAfterAll.scala:210)
	at org.scalatest.BeforeAndAfterAll.run$(BeforeAndAfterAll.scala:208)
	at sttp.tapir.client.tests.ClientTests.run(ClientTests.scala:15)
	at org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:321)
	at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:517)
	at sbt.TestRunner.runTest$1(TestFramework.scala:153)
	at sbt.TestRunner.run(TestFramework.scala:168)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.$anonfun$apply$1(TestFramework.scala:336)
	at sbt.TestFramework$.sbt$TestFramework$$withContextLoader(TestFramework.scala:296)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFunction.apply(TestFramework.scala:348)
	at sbt.Tests$.processRunnable$1(Tests.scala:475)
	at sbt.Tests$.$anonfun$makeSerial$1(Tests.scala:481)
	at sbt.std.Transform$$anon$3.$anonfun$apply$2(Transform.scala:47)
	at sbt.std.Transform$$anon$4.work(Transform.scala:69)
	at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
	at sbt.Execute.work(Execute.scala:292)
	at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

Check failure on line 102 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.13-JVM-11

sttp.tapir.client.sttp4.SttpClientStreamingZioTests ► Endpoint(securityin: -, in: POST /api /echo {body as stream}, errout: -, out: {body as stream})

Failed test found in: client/sttp-client4/target/jvm-2.13/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientStreamingZioTests.xml Error: java.lang.ClassCastException: class zio.stream.ZStream cannot be cast to class java.io.InputStream (zio.stream.ZStream is in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1; java.io.InputStream is in module java.base of loader 'bootstrap')
Raw output
java.lang.ClassCastException: class zio.stream.ZStream cannot be cast to class java.io.InputStream (zio.stream.ZStream is in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1; java.io.InputStream is in module java.base of loader 'bootstrap')
	at sttp.tapir.client.sttp4.EndpointToSttpClient.setInputParams(EndpointToSttpClient.scala:102)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.handleInputPair(EndpointToSttpClient.scala:143)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.setInputParams(EndpointToSttpClient.scala:126)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:33)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientZioTests.$anonfun$send$1(SttpClientZioTests.scala:31)
	at delay @ sttp.tapir.client.sttp4.SttpClientZioTests.send(SttpClientZioTests.scala:26)
	at fromFuture @ sttp.tapir.client.tests.ClientTests.doAdjust$1(ClientTests.scala:33)
	at map @ sttp.tapir.client.tests.ClientStreamingTests.$anonfun$streamingTests$1(ClientStreamingTests.scala:15)
	at map @ sttp.tapir.client.tests.ClientStreamingTests.$anonfun$streamingTests$1(ClientStreamingTests.scala:16)
	at map @ sttp.tapir.client.tests.ClientStreamingTests.$anonfun$streamingTests$1(ClientStreamingTests.scala:17)
(uri, req2)
case EndpointIO.Header(name, codec, _) =>
val req2 = codec
Expand All @@ -114,8 +109,11 @@ private[sttp] class EndpointToSttpClient[R](clientOptions: SttpClientOptions, ws
case EndpointIO.Headers(codec, _) =>
val headers = codec.encode(value)
val req2 = headers.foldLeft(req) { case (r, h) =>
val replaceExisting = HeaderNames.ContentType.equalsIgnoreCase(h.name) || HeaderNames.ContentLength.equalsIgnoreCase(h.name)
r.header(h, replaceExisting)
val onDuplicate =
if (HeaderNames.ContentType.equalsIgnoreCase(h.name) || HeaderNames.ContentLength.equalsIgnoreCase(h.name))
DuplicateHeaderBehavior.Replace
else DuplicateHeaderBehavior.Add
r.header(h, onDuplicate)
}
(uri, req2)
case EndpointIO.FixedHeader(h, _, _) =>
Expand Down Expand Up @@ -174,7 +172,7 @@ private[sttp] class EndpointToSttpClient[R](clientOptions: SttpClientOptions, ws
case RawBodyType.FileBody => req.body(encoded.file)
case RawBodyType.InputStreamRangeBody => req.body(encoded.inputStream())
case m: RawBodyType.MultipartBody =>
val parts: Seq[Part[RequestBody[Any]]] = (encoded: Seq[RawPart]).flatMap { p =>
val parts: Seq[Part[BasicBodyPart]] = (encoded: Seq[RawPart]).flatMap { p =>
m.partType(p.name).map { partType =>
// copying the name & body
val sttpPart1 = partToSttpPart(p.asInstanceOf[Part[Any]], partType.asInstanceOf[RawBodyType[Any]])
Expand All @@ -193,7 +191,7 @@ private[sttp] class EndpointToSttpClient[R](clientOptions: SttpClientOptions, ws
if (wasContentTypeAlreadySet) req2 else req2.contentType(codec.format.mediaType)
}

private def partToSttpPart[T](p: Part[T], bodyType: RawBodyType[T]): Part[RequestBody[Any]] =
private def partToSttpPart[T](p: Part[T], bodyType: RawBodyType[T]): Part[BasicBodyPart] =
bodyType match {
case RawBodyType.StringBody(charset) => multipart(p.name, p.body, charset.toString)
case RawBodyType.ByteArrayBody => multipart(p.name, p.body)
Expand All @@ -204,10 +202,10 @@ private[sttp] class EndpointToSttpClient[R](clientOptions: SttpClientOptions, ws
case RawBodyType.MultipartBody(_, _) => throw new IllegalArgumentException("Nested multipart bodies aren't supported")
}

private def responseAsFromOutputs(out: EndpointOutput[_], isWebSocket: Boolean): ResponseAs[Any, Any] = {
private def responseAsFromOutputs(out: EndpointOutput[_], isWebSocket: Boolean): ResponseAs[Any] = {
((bodyIsStream(out), isWebSocket) match {

Check failure on line 206 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.12-JVM-11

sttp.tapir.client.sttp4.SttpAkkaClientWebSocketTests ► web sockets, string client-terminated echo

Failed test found in: client/sttp-client4/target/jvm-2.12/test-reports/TEST-sttp.tapir.client.sttp4.SttpAkkaClientWebSocketTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:206)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpAkkaClientTests.$anonfun$send$1(SttpAkkaClientTests.scala:32)
	at apply @ sttp.tapir.client.sttp4.SttpAkkaClientTests.send(SttpAkkaClientTests.scala:34)
	at fromFuture @ sttp.tapir.client.tests.ClientTests.doAdjust$1(ClientTests.scala:33)
	at flatMap @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$1(ClientWebSocketTests.scala:26)
	at map @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$1(ClientWebSocketTests.scala:29)

Check failure on line 206 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.12-JVM-11

sttp.tapir.client.sttp4.SttpAkkaClientWebSocketTests ► web sockets, json client-terminated echo

Failed test found in: client/sttp-client4/target/jvm-2.12/test-reports/TEST-sttp.tapir.client.sttp4.SttpAkkaClientWebSocketTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:206)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpAkkaClientTests.$anonfun$send$1(SttpAkkaClientTests.scala:32)
	at apply @ sttp.tapir.client.sttp4.SttpAkkaClientTests.send(SttpAkkaClientTests.scala:34)
	at fromFuture @ sttp.tapir.client.tests.ClientTests.doAdjust$1(ClientTests.scala:33)
	at flatMap @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$4(ClientWebSocketTests.scala:41)
	at map @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$4(ClientWebSocketTests.scala:44)

Check failure on line 206 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.12-JVM-11

sttp.tapir.client.sttp4.SttpAkkaClientWebSocketTests ► web sockets, client-terminated echo using fragmented frames

Failed test found in: client/sttp-client4/target/jvm-2.12/test-reports/TEST-sttp.tapir.client.sttp4.SttpAkkaClientWebSocketTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:206)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpAkkaClientTests.$anonfun$send$1(SttpAkkaClientTests.scala:32)
	at apply @ sttp.tapir.client.sttp4.SttpAkkaClientTests.send(SttpAkkaClientTests.scala:34)
	at fromFuture @ sttp.tapir.client.tests.ClientTests.doAdjust$1(ClientTests.scala:33)
	at flatMap @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$13(ClientWebSocketTests.scala:58)
	at map @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$13(ClientWebSocketTests.scala:61)

Check failure on line 206 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.12-JVM-11

sttp.tapir.client.sttp4.SttpClientWebSocketPekkoTests ► web sockets, string client-terminated echo

Failed test found in: client/sttp-client4/target/jvm-2.12/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientWebSocketPekkoTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:206)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientPekkoTests.$anonfun$send$1(SttpClientPekkoTests.scala:33)
	at apply @ sttp.tapir.client.sttp4.SttpClientPekkoTests.send(SttpClientPekkoTests.scala:35)
	at fromFuture @ sttp.tapir.client.tests.ClientTests.doAdjust$1(ClientTests.scala:33)
	at flatMap @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$1(ClientWebSocketTests.scala:26)
	at map @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$1(ClientWebSocketTests.scala:29)

Check failure on line 206 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.12-JVM-11

sttp.tapir.client.sttp4.SttpClientWebSocketPekkoTests ► web sockets, json client-terminated echo

Failed test found in: client/sttp-client4/target/jvm-2.12/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientWebSocketPekkoTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:206)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientPekkoTests.$anonfun$send$1(SttpClientPekkoTests.scala:33)
	at apply @ sttp.tapir.client.sttp4.SttpClientPekkoTests.send(SttpClientPekkoTests.scala:35)
	at fromFuture @ sttp.tapir.client.tests.ClientTests.doAdjust$1(ClientTests.scala:33)
	at flatMap @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$4(ClientWebSocketTests.scala:41)
	at map @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$4(ClientWebSocketTests.scala:44)

Check failure on line 206 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.12-JVM-11

sttp.tapir.client.sttp4.SttpClientWebSocketPekkoTests ► web sockets, client-terminated echo using fragmented frames

Failed test found in: client/sttp-client4/target/jvm-2.12/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientWebSocketPekkoTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:206)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientPekkoTests.$anonfun$send$1(SttpClientPekkoTests.scala:33)
	at apply @ sttp.tapir.client.sttp4.SttpClientPekkoTests.send(SttpClientPekkoTests.scala:35)
	at fromFuture @ sttp.tapir.client.tests.ClientTests.doAdjust$1(ClientTests.scala:33)
	at flatMap @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$13(ClientWebSocketTests.scala:58)
	at map @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$13(ClientWebSocketTests.scala:61)

Check failure on line 206 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.12-JVM-11

sttp.tapir.client.sttp4.SttpClientWebSocketTests ► web sockets, string client-terminated echo

Failed test found in: client/sttp-client4/target/jvm-2.12/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientWebSocketTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:206)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientTests.send(SttpClientTests.scala:29)
	at sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$1(ClientWebSocketTests.scala:24)
	at org.scalatest.AsyncTestSuite.$anonfun$transformToOutcome$1(AsyncTestSuite.scala:240)
	at org.scalatest.funsuite.AsyncFunSuiteLike$$anon$1.apply(AsyncFunSuiteLike.scala:207)
	at org.scalatest.AsyncTestSuite.withFixture(AsyncTestSuite.scala:316)
	at org.scalatest.AsyncTestSuite.withFixture$(AsyncTestSuite.scala:315)
	at org.scalatest.funsuite.AsyncFunSuite.withFixture(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.invokeWithAsyncFixture$1(AsyncFunSuiteLike.scala:205)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$runTest$1(AsyncFunSuiteLike.scala:219)
	at org.scalatest.AsyncSuperEngine.runTestImpl(AsyncEngine.scala:374)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest(AsyncFunSuiteLike.scala:219)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest$(AsyncFunSuiteLike.scala:199)
	at org.scalatest.funsuite.AsyncFunSuite.runTest(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$runTests$1(AsyncFunSuiteLike.scala:252)
	at org.scalatest.AsyncSuperEngine.$anonfun$runTestsInBranch$1(AsyncEngine.scala:432)
	at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126)
	at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:122)
	at scala.collection.immutable.List.foldLeft(List.scala:91)
	at org.scalatest.AsyncSuperEngine.traverseSubNodes$1(AsyncEngine.scala:406)
	at org.scalatest.AsyncSuperEngine.runTestsInBranch(AsyncEngine.scala:487)
	at org.scalatest.AsyncSuperEngine.runTestsImpl(AsyncEngine.scala:555)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests(AsyncFunSuiteLike.scala:252)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests$(AsyncFunSuiteLike.scala:251)
	at org.scalatest.funsuite.AsyncFunSuite.runTests(AsyncFunSuite.scala:2192)
	at org.scalatest.Suite.run(Suite.scala:1114)
	at org.scalatest.Suite.run$(Suite.scala:1096)
	at org.scalatest.funsuite.AsyncFunSuite.org$scalatest$funsuite$AsyncFunSuiteLike$$super$run(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$run$1(AsyncFunSuiteLike.scala:256)
	at org.scalatest.AsyncSuperEngine.runImpl(AsyncEngine.scala:625)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run(AsyncFunSuiteLike.scala:256)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run$(AsyncFunSuiteLike.scala:255)
	at sttp.tapir.client.tests.ClientTests.org$scalatest$BeforeAndAfterAll$$super$run(ClientTests.scala:15)
	at org.scalatest.BeforeAndAfterAll.liftedTree1$1(BeforeAndAfterAll.scala:213)
	at org.scalatest.BeforeAndAfterAll.run(BeforeAndAfterAll.scala:210)
	at org.scalatest.BeforeAndAfterAll.run$(BeforeAndAfterAll.scala:208)
	at sttp.tapir.client.tests.ClientTests.run(ClientTests.scala:15)
	at org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:321)
	at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:517)
	at sbt.TestRunner.runTest$1(TestFramework.scala:153)
	at sbt.TestRunner.run(TestFramework.scala:168)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.$anonfun$apply$1(TestFramework.scala:336)
	at sbt.TestFramework$.sbt$TestFramework$$withContextLoader(TestFramework.scala:296)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFunction.apply(TestFramework.scala:348)
	at sbt.Tests$.processRunnable$1(Tests.scala:475)
	at sbt.Tests$.$anonfun$makeSerial$1(Tests.scala:481)
	at sbt.std.Transform$$anon$3.$anonfun$apply$2(Transform.scala:47)
	at sbt.std.Transform$$anon$4.work(Transform.scala:69)
	at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
	at sbt.Execute.work(Execute.scala:292)
	at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

Check failure on line 206 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.12-JVM-11

sttp.tapir.client.sttp4.SttpClientWebSocketTests ► web sockets, json client-terminated echo

Failed test found in: client/sttp-client4/target/jvm-2.12/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientWebSocketTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:206)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientTests.send(SttpClientTests.scala:29)
	at sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$4(ClientWebSocketTests.scala:39)
	at org.scalatest.AsyncTestSuite.$anonfun$transformToOutcome$1(AsyncTestSuite.scala:240)
	at org.scalatest.funsuite.AsyncFunSuiteLike$$anon$1.apply(AsyncFunSuiteLike.scala:207)
	at org.scalatest.AsyncTestSuite.withFixture(AsyncTestSuite.scala:316)
	at org.scalatest.AsyncTestSuite.withFixture$(AsyncTestSuite.scala:315)
	at org.scalatest.funsuite.AsyncFunSuite.withFixture(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.invokeWithAsyncFixture$1(AsyncFunSuiteLike.scala:205)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$runTest$1(AsyncFunSuiteLike.scala:219)
	at org.scalatest.AsyncSuperEngine.runTestImpl(AsyncEngine.scala:374)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest(AsyncFunSuiteLike.scala:219)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest$(AsyncFunSuiteLike.scala:199)
	at org.scalatest.funsuite.AsyncFunSuite.runTest(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$runTests$1(AsyncFunSuiteLike.scala:252)
	at org.scalatest.AsyncSuperEngine.$anonfun$runTestsInBranch$3(AsyncEngine.scala:435)
	at org.scalatest.Status.$anonfun$thenRun$1(Status.scala:227)
	at org.scalatest.Status.$anonfun$thenRun$1$adapted(Status.scala:225)
	at org.scalatest.FailedStatus$.whenCompleted(Status.scala:505)
	at org.scalatest.Status.thenRun(Status.scala:225)
	at org.scalatest.Status.thenRun$(Status.scala:220)
	at org.scalatest.FailedStatus$.thenRun(Status.scala:477)
	at org.scalatest.AsyncSuperEngine.$anonfun$runTestsInBranch$1(AsyncEngine.scala:435)
	at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126)
	at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:122)
	at scala.collection.immutable.List.foldLeft(List.scala:91)
	at org.scalatest.AsyncSuperEngine.traverseSubNodes$1(AsyncEngine.scala:406)
	at org.scalatest.AsyncSuperEngine.runTestsInBranch(AsyncEngine.scala:487)
	at org.scalatest.AsyncSuperEngine.runTestsImpl(AsyncEngine.scala:555)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests(AsyncFunSuiteLike.scala:252)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests$(AsyncFunSuiteLike.scala:251)
	at org.scalatest.funsuite.AsyncFunSuite.runTests(AsyncFunSuite.scala:2192)
	at org.scalatest.Suite.run(Suite.scala:1114)
	at org.scalatest.Suite.run$(Suite.scala:1096)
	at org.scalatest.funsuite.AsyncFunSuite.org$scalatest$funsuite$AsyncFunSuiteLike$$super$run(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$run$1(AsyncFunSuiteLike.scala:256)
	at org.scalatest.AsyncSuperEngine.runImpl(AsyncEngine.scala:625)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run(AsyncFunSuiteLike.scala:256)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run$(AsyncFunSuiteLike.scala:255)
	at sttp.tapir.client.tests.ClientTests.org$scalatest$BeforeAndAfterAll$$super$run(ClientTests.scala:15)
	at org.scalatest.BeforeAndAfterAll.liftedTree1$1(BeforeAndAfterAll.scala:213)
	at org.scalatest.BeforeAndAfterAll.run(BeforeAndAfterAll.scala:210)
	at org.scalatest.BeforeAndAfterAll.run$(BeforeAndAfterAll.scala:208)
	at sttp.tapir.client.tests.ClientTests.run(ClientTests.scala:15)
	at org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:321)
	at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:517)
	at sbt.TestRunner.runTest$1(TestFramework.scala:153)
	at sbt.TestRunner.run(TestFramework.scala:168)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.$anonfun$apply$1(TestFramework.scala:336)
	at sbt.TestFramework$.sbt$TestFramework$$withContextLoader(TestFramework.scala:296)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFunction.apply(TestFramework.scala:348)
	at sbt.Tests$.processRunnable$1(Tests.scala:475)
	at sbt.Tests$.$anonfun$makeSerial$1(Tests.scala:481)
	at sbt.std.Transform$$anon$3.$anonfun$apply$2(Transform.scala:47)
	at sbt.std.Transform$$anon$4.work(Transform.scala:69)
	at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
	at sbt.Execute.work(Execute.scala:292)
	at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

Check failure on line 206 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.12-JVM-11

sttp.tapir.client.sttp4.SttpClientWebSocketTests ► web sockets, client-terminated echo using fragmented frames

Failed test found in: client/sttp-client4/target/jvm-2.12/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientWebSocketTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @17fc6149)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:206)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientTests.send(SttpClientTests.scala:29)
	at sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$13(ClientWebSocketTests.scala:56)
	at org.scalatest.AsyncTestSuite.$anonfun$transformToOutcome$1(AsyncTestSuite.scala:240)
	at org.scalatest.funsuite.AsyncFunSuiteLike$$anon$1.apply(AsyncFunSuiteLike.scala:207)
	at org.scalatest.AsyncTestSuite.withFixture(AsyncTestSuite.scala:316)
	at org.scalatest.AsyncTestSuite.withFixture$(AsyncTestSuite.scala:315)
	at org.scalatest.funsuite.AsyncFunSuite.withFixture(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.invokeWithAsyncFixture$1(AsyncFunSuiteLike.scala:205)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$runTest$1(AsyncFunSuiteLike.scala:219)
	at org.scalatest.AsyncSuperEngine.runTestImpl(AsyncEngine.scala:374)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest(AsyncFunSuiteLike.scala:219)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest$(AsyncFunSuiteLike.scala:199)
	at org.scalatest.funsuite.AsyncFunSuite.runTest(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$runTests$1(AsyncFunSuiteLike.scala:252)
	at org.scalatest.AsyncSuperEngine.$anonfun$runTestsInBranch$3(AsyncEngine.scala:435)
	at org.scalatest.Status.$anonfun$thenRun$1(Status.scala:227)
	at org.scalatest.Status.$anonfun$thenRun$1$adapted(Status.scala:225)
	at org.scalatest.ScalaTestStatefulStatus.whenCompleted(Status.scala:648)
	at org.scalatest.Status.thenRun(Status.scala:225)
	at org.scalatest.Status.thenRun$(Status.scala:220)
	at org.scalatest.ScalaTestStatefulStatus.thenRun(Status.scala:511)
	at org.scalatest.AsyncSuperEngine.$anonfun$runTestsInBranch$1(AsyncEngine.scala:435)
	at scala.collection.LinearSeqOptimized.foldLeft(LinearSeqOptimized.scala:126)
	at scala.collection.LinearSeqOptimized.foldLeft$(LinearSeqOptimized.scala:122)
	at scala.collection.immutable.List.foldLeft(List.scala:91)
	at org.scalatest.AsyncSuperEngine.traverseSubNodes$1(AsyncEngine.scala:406)
	at org.scalatest.AsyncSuperEngine.runTestsInBranch(AsyncEngine.scala:487)
	at org.scalatest.AsyncSuperEngine.runTestsImpl(AsyncEngine.scala:555)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests(AsyncFunSuiteLike.scala:252)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests$(AsyncFunSuiteLike.scala:251)
	at org.scalatest.funsuite.AsyncFunSuite.runTests(AsyncFunSuite.scala:2192)
	at org.scalatest.Suite.run(Suite.scala:1114)
	at org.scalatest.Suite.run$(Suite.scala:1096)
	at org.scalatest.funsuite.AsyncFunSuite.org$scalatest$funsuite$AsyncFunSuiteLike$$super$run(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$run$1(AsyncFunSuiteLike.scala:256)
	at org.scalatest.AsyncSuperEngine.runImpl(AsyncEngine.scala:625)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run(AsyncFunSuiteLike.scala:256)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run$(AsyncFunSuiteLike.scala:255)
	at sttp.tapir.client.tests.ClientTests.org$scalatest$BeforeAndAfterAll$$super$run(ClientTests.scala:15)
	at org.scalatest.BeforeAndAfterAll.liftedTree1$1(BeforeAndAfterAll.scala:213)
	at org.scalatest.BeforeAndAfterAll.run(BeforeAndAfterAll.scala:210)
	at org.scalatest.BeforeAndAfterAll.run$(BeforeAndAfterAll.scala:208)
	at sttp.tapir.client.tests.ClientTests.run(ClientTests.scala:15)
	at org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:321)
	at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:517)
	at sbt.TestRunner.runTest$1(TestFramework.scala:153)
	at sbt.TestRunner.run(TestFramework.scala:168)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.$anonfun$apply$1(TestFramework.scala:336)
	at sbt.TestFramework$.sbt$TestFramework$$withContextLoader(TestFramework.scala:296)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFunction.apply(TestFramework.scala:348)
	at sbt.Tests$.processRunnable$1(Tests.scala:475)
	at sbt.Tests$.$anonfun$makeSerial$1(Tests.scala:481)
	at sbt.std.Transform$$anon$3.$anonfun$apply$2(Transform.scala:47)
	at sbt.std.Transform$$anon$4.work(Transform.scala:69)
	at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
	at sbt.Execute.work(Execute.scala:292)
	at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

Check failure on line 206 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.13-JVM-11

sttp.tapir.client.sttp4.SttpAkkaClientWebSocketTests ► web sockets, string client-terminated echo

Failed test found in: client/sttp-client4/target/jvm-2.13/test-reports/TEST-sttp.tapir.client.sttp4.SttpAkkaClientWebSocketTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:206)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpAkkaClientTests.$anonfun$send$1(SttpAkkaClientTests.scala:32)
	at apply @ sttp.tapir.client.sttp4.SttpAkkaClientTests.send(SttpAkkaClientTests.scala:34)
	at fromFuture @ sttp.tapir.client.tests.ClientTests.doAdjust$1(ClientTests.scala:33)
	at flatMap @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$1(ClientWebSocketTests.scala:26)
	at map @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$1(ClientWebSocketTests.scala:29)

Check failure on line 206 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.13-JVM-11

sttp.tapir.client.sttp4.SttpAkkaClientWebSocketTests ► web sockets, json client-terminated echo

Failed test found in: client/sttp-client4/target/jvm-2.13/test-reports/TEST-sttp.tapir.client.sttp4.SttpAkkaClientWebSocketTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:206)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpAkkaClientTests.$anonfun$send$1(SttpAkkaClientTests.scala:32)
	at apply @ sttp.tapir.client.sttp4.SttpAkkaClientTests.send(SttpAkkaClientTests.scala:34)
	at fromFuture @ sttp.tapir.client.tests.ClientTests.doAdjust$1(ClientTests.scala:33)
	at flatMap @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$4(ClientWebSocketTests.scala:41)
	at map @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$4(ClientWebSocketTests.scala:44)

Check failure on line 206 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.13-JVM-11

sttp.tapir.client.sttp4.SttpAkkaClientWebSocketTests ► web sockets, client-terminated echo using fragmented frames

Failed test found in: client/sttp-client4/target/jvm-2.13/test-reports/TEST-sttp.tapir.client.sttp4.SttpAkkaClientWebSocketTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:206)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpAkkaClientTests.$anonfun$send$1(SttpAkkaClientTests.scala:32)
	at apply @ sttp.tapir.client.sttp4.SttpAkkaClientTests.send(SttpAkkaClientTests.scala:34)
	at fromFuture @ sttp.tapir.client.tests.ClientTests.doAdjust$1(ClientTests.scala:33)
	at flatMap @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$13(ClientWebSocketTests.scala:58)
	at map @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$13(ClientWebSocketTests.scala:61)

Check failure on line 206 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.13-JVM-11

sttp.tapir.client.sttp4.SttpClientWebSocketPekkoTests ► web sockets, string client-terminated echo

Failed test found in: client/sttp-client4/target/jvm-2.13/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientWebSocketPekkoTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:206)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientPekkoTests.$anonfun$send$1(SttpClientPekkoTests.scala:33)
	at apply @ sttp.tapir.client.sttp4.SttpClientPekkoTests.send(SttpClientPekkoTests.scala:35)
	at fromFuture @ sttp.tapir.client.tests.ClientTests.doAdjust$1(ClientTests.scala:33)
	at flatMap @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$1(ClientWebSocketTests.scala:26)
	at map @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$1(ClientWebSocketTests.scala:29)

Check failure on line 206 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.13-JVM-11

sttp.tapir.client.sttp4.SttpClientWebSocketPekkoTests ► web sockets, json client-terminated echo

Failed test found in: client/sttp-client4/target/jvm-2.13/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientWebSocketPekkoTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:206)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientPekkoTests.$anonfun$send$1(SttpClientPekkoTests.scala:33)
	at apply @ sttp.tapir.client.sttp4.SttpClientPekkoTests.send(SttpClientPekkoTests.scala:35)
	at fromFuture @ sttp.tapir.client.tests.ClientTests.doAdjust$1(ClientTests.scala:33)
	at flatMap @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$4(ClientWebSocketTests.scala:41)
	at map @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$4(ClientWebSocketTests.scala:44)

Check failure on line 206 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.13-JVM-11

sttp.tapir.client.sttp4.SttpClientWebSocketPekkoTests ► web sockets, client-terminated echo using fragmented frames

Failed test found in: client/sttp-client4/target/jvm-2.13/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientWebSocketPekkoTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:206)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientPekkoTests.$anonfun$send$1(SttpClientPekkoTests.scala:33)
	at apply @ sttp.tapir.client.sttp4.SttpClientPekkoTests.send(SttpClientPekkoTests.scala:35)
	at fromFuture @ sttp.tapir.client.tests.ClientTests.doAdjust$1(ClientTests.scala:33)
	at flatMap @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$13(ClientWebSocketTests.scala:58)
	at map @ sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$13(ClientWebSocketTests.scala:61)

Check failure on line 206 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.13-JVM-11

sttp.tapir.client.sttp4.SttpClientWebSocketTests ► web sockets, string client-terminated echo

Failed test found in: client/sttp-client4/target/jvm-2.13/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientWebSocketTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:206)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientTests.send(SttpClientTests.scala:29)
	at sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$1(ClientWebSocketTests.scala:24)
	at org.scalatest.AsyncTestSuite.$anonfun$transformToOutcome$1(AsyncTestSuite.scala:240)
	at org.scalatest.funsuite.AsyncFunSuiteLike$$anon$1.apply(AsyncFunSuiteLike.scala:207)
	at org.scalatest.AsyncTestSuite.withFixture(AsyncTestSuite.scala:316)
	at org.scalatest.AsyncTestSuite.withFixture$(AsyncTestSuite.scala:315)
	at org.scalatest.funsuite.AsyncFunSuite.withFixture(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.invokeWithAsyncFixture$1(AsyncFunSuiteLike.scala:205)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$runTest$1(AsyncFunSuiteLike.scala:219)
	at org.scalatest.AsyncSuperEngine.runTestImpl(AsyncEngine.scala:374)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest(AsyncFunSuiteLike.scala:219)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest$(AsyncFunSuiteLike.scala:199)
	at org.scalatest.funsuite.AsyncFunSuite.runTest(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$runTests$1(AsyncFunSuiteLike.scala:252)
	at org.scalatest.AsyncSuperEngine.$anonfun$runTestsInBranch$1(AsyncEngine.scala:432)
	at scala.collection.LinearSeqOps.foldLeft(LinearSeq.scala:183)
	at scala.collection.LinearSeqOps.foldLeft$(LinearSeq.scala:179)
	at scala.collection.immutable.List.foldLeft(List.scala:79)
	at org.scalatest.AsyncSuperEngine.traverseSubNodes$1(AsyncEngine.scala:406)
	at org.scalatest.AsyncSuperEngine.runTestsInBranch(AsyncEngine.scala:487)
	at org.scalatest.AsyncSuperEngine.runTestsImpl(AsyncEngine.scala:555)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests(AsyncFunSuiteLike.scala:252)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests$(AsyncFunSuiteLike.scala:251)
	at org.scalatest.funsuite.AsyncFunSuite.runTests(AsyncFunSuite.scala:2192)
	at org.scalatest.Suite.run(Suite.scala:1114)
	at org.scalatest.Suite.run$(Suite.scala:1096)
	at org.scalatest.funsuite.AsyncFunSuite.org$scalatest$funsuite$AsyncFunSuiteLike$$super$run(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$run$1(AsyncFunSuiteLike.scala:256)
	at org.scalatest.AsyncSuperEngine.runImpl(AsyncEngine.scala:625)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run(AsyncFunSuiteLike.scala:256)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run$(AsyncFunSuiteLike.scala:255)
	at sttp.tapir.client.tests.ClientTests.org$scalatest$BeforeAndAfterAll$$super$run(ClientTests.scala:15)
	at org.scalatest.BeforeAndAfterAll.liftedTree1$1(BeforeAndAfterAll.scala:213)
	at org.scalatest.BeforeAndAfterAll.run(BeforeAndAfterAll.scala:210)
	at org.scalatest.BeforeAndAfterAll.run$(BeforeAndAfterAll.scala:208)
	at sttp.tapir.client.tests.ClientTests.run(ClientTests.scala:15)
	at org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:321)
	at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:517)
	at sbt.TestRunner.runTest$1(TestFramework.scala:153)
	at sbt.TestRunner.run(TestFramework.scala:168)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.$anonfun$apply$1(TestFramework.scala:336)
	at sbt.TestFramework$.sbt$TestFramework$$withContextLoader(TestFramework.scala:296)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFunction.apply(TestFramework.scala:348)
	at sbt.Tests$.processRunnable$1(Tests.scala:475)
	at sbt.Tests$.$anonfun$makeSerial$1(Tests.scala:481)
	at sbt.std.Transform$$anon$3.$anonfun$apply$2(Transform.scala:47)
	at sbt.std.Transform$$anon$4.work(Transform.scala:69)
	at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
	at sbt.Execute.work(Execute.scala:292)
	at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

Check failure on line 206 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.13-JVM-11

sttp.tapir.client.sttp4.SttpClientWebSocketTests ► web sockets, json client-terminated echo

Failed test found in: client/sttp-client4/target/jvm-2.13/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientWebSocketTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:206)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientTests.send(SttpClientTests.scala:29)
	at sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$4(ClientWebSocketTests.scala:39)
	at org.scalatest.AsyncTestSuite.$anonfun$transformToOutcome$1(AsyncTestSuite.scala:240)
	at org.scalatest.funsuite.AsyncFunSuiteLike$$anon$1.apply(AsyncFunSuiteLike.scala:207)
	at org.scalatest.AsyncTestSuite.withFixture(AsyncTestSuite.scala:316)
	at org.scalatest.AsyncTestSuite.withFixture$(AsyncTestSuite.scala:315)
	at org.scalatest.funsuite.AsyncFunSuite.withFixture(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.invokeWithAsyncFixture$1(AsyncFunSuiteLike.scala:205)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$runTest$1(AsyncFunSuiteLike.scala:219)
	at org.scalatest.AsyncSuperEngine.runTestImpl(AsyncEngine.scala:374)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest(AsyncFunSuiteLike.scala:219)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest$(AsyncFunSuiteLike.scala:199)
	at org.scalatest.funsuite.AsyncFunSuite.runTest(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$runTests$1(AsyncFunSuiteLike.scala:252)
	at org.scalatest.AsyncSuperEngine.$anonfun$runTestsInBranch$3(AsyncEngine.scala:435)
	at org.scalatest.Status.$anonfun$thenRun$1(Status.scala:227)
	at org.scalatest.Status.$anonfun$thenRun$1$adapted(Status.scala:225)
	at org.scalatest.FailedStatus$.whenCompleted(Status.scala:505)
	at org.scalatest.Status.thenRun(Status.scala:225)
	at org.scalatest.Status.thenRun$(Status.scala:220)
	at org.scalatest.FailedStatus$.thenRun(Status.scala:477)
	at org.scalatest.AsyncSuperEngine.$anonfun$runTestsInBranch$1(AsyncEngine.scala:435)
	at scala.collection.LinearSeqOps.foldLeft(LinearSeq.scala:183)
	at scala.collection.LinearSeqOps.foldLeft$(LinearSeq.scala:179)
	at scala.collection.immutable.List.foldLeft(List.scala:79)
	at org.scalatest.AsyncSuperEngine.traverseSubNodes$1(AsyncEngine.scala:406)
	at org.scalatest.AsyncSuperEngine.runTestsInBranch(AsyncEngine.scala:487)
	at org.scalatest.AsyncSuperEngine.runTestsImpl(AsyncEngine.scala:555)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests(AsyncFunSuiteLike.scala:252)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests$(AsyncFunSuiteLike.scala:251)
	at org.scalatest.funsuite.AsyncFunSuite.runTests(AsyncFunSuite.scala:2192)
	at org.scalatest.Suite.run(Suite.scala:1114)
	at org.scalatest.Suite.run$(Suite.scala:1096)
	at org.scalatest.funsuite.AsyncFunSuite.org$scalatest$funsuite$AsyncFunSuiteLike$$super$run(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$run$1(AsyncFunSuiteLike.scala:256)
	at org.scalatest.AsyncSuperEngine.runImpl(AsyncEngine.scala:625)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run(AsyncFunSuiteLike.scala:256)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run$(AsyncFunSuiteLike.scala:255)
	at sttp.tapir.client.tests.ClientTests.org$scalatest$BeforeAndAfterAll$$super$run(ClientTests.scala:15)
	at org.scalatest.BeforeAndAfterAll.liftedTree1$1(BeforeAndAfterAll.scala:213)
	at org.scalatest.BeforeAndAfterAll.run(BeforeAndAfterAll.scala:210)
	at org.scalatest.BeforeAndAfterAll.run$(BeforeAndAfterAll.scala:208)
	at sttp.tapir.client.tests.ClientTests.run(ClientTests.scala:15)
	at org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:321)
	at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:517)
	at sbt.TestRunner.runTest$1(TestFramework.scala:153)
	at sbt.TestRunner.run(TestFramework.scala:168)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.$anonfun$apply$1(TestFramework.scala:336)
	at sbt.TestFramework$.sbt$TestFramework$$withContextLoader(TestFramework.scala:296)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFunction.apply(TestFramework.scala:348)
	at sbt.Tests$.processRunnable$1(Tests.scala:475)
	at sbt.Tests$.$anonfun$makeSerial$1(Tests.scala:481)
	at sbt.std.Transform$$anon$3.$anonfun$apply$2(Transform.scala:47)
	at sbt.std.Transform$$anon$4.work(Transform.scala:69)
	at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
	at sbt.Execute.work(Execute.scala:292)
	at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

Check failure on line 206 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 2.13-JVM-11

sttp.tapir.client.sttp4.SttpClientWebSocketTests ► web sockets, client-terminated echo using fragmented frames

Failed test found in: client/sttp-client4/target/jvm-2.13/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientWebSocketTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @41298e1)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:206)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.$anonfun$toSttpRequest$2(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.$anonfun$toSecureRequestThrowDecodeFailures$2(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientTests.send(SttpClientTests.scala:29)
	at sttp.tapir.client.tests.ClientWebSocketTests.$anonfun$webSocketTests$13(ClientWebSocketTests.scala:56)
	at org.scalatest.AsyncTestSuite.$anonfun$transformToOutcome$1(AsyncTestSuite.scala:240)
	at org.scalatest.funsuite.AsyncFunSuiteLike$$anon$1.apply(AsyncFunSuiteLike.scala:207)
	at org.scalatest.AsyncTestSuite.withFixture(AsyncTestSuite.scala:316)
	at org.scalatest.AsyncTestSuite.withFixture$(AsyncTestSuite.scala:315)
	at org.scalatest.funsuite.AsyncFunSuite.withFixture(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.invokeWithAsyncFixture$1(AsyncFunSuiteLike.scala:205)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$runTest$1(AsyncFunSuiteLike.scala:219)
	at org.scalatest.AsyncSuperEngine.runTestImpl(AsyncEngine.scala:374)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest(AsyncFunSuiteLike.scala:219)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest$(AsyncFunSuiteLike.scala:199)
	at org.scalatest.funsuite.AsyncFunSuite.runTest(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$runTests$1(AsyncFunSuiteLike.scala:252)
	at org.scalatest.AsyncSuperEngine.$anonfun$runTestsInBranch$3(AsyncEngine.scala:435)
	at org.scalatest.Status.$anonfun$thenRun$1(Status.scala:227)
	at org.scalatest.Status.$anonfun$thenRun$1$adapted(Status.scala:225)
	at org.scalatest.ScalaTestStatefulStatus.whenCompleted(Status.scala:648)
	at org.scalatest.Status.thenRun(Status.scala:225)
	at org.scalatest.Status.thenRun$(Status.scala:220)
	at org.scalatest.ScalaTestStatefulStatus.thenRun(Status.scala:511)
	at org.scalatest.AsyncSuperEngine.$anonfun$runTestsInBranch$1(AsyncEngine.scala:435)
	at scala.collection.LinearSeqOps.foldLeft(LinearSeq.scala:183)
	at scala.collection.LinearSeqOps.foldLeft$(LinearSeq.scala:179)
	at scala.collection.immutable.List.foldLeft(List.scala:79)
	at org.scalatest.AsyncSuperEngine.traverseSubNodes$1(AsyncEngine.scala:406)
	at org.scalatest.AsyncSuperEngine.runTestsInBranch(AsyncEngine.scala:487)
	at org.scalatest.AsyncSuperEngine.runTestsImpl(AsyncEngine.scala:555)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests(AsyncFunSuiteLike.scala:252)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests$(AsyncFunSuiteLike.scala:251)
	at org.scalatest.funsuite.AsyncFunSuite.runTests(AsyncFunSuite.scala:2192)
	at org.scalatest.Suite.run(Suite.scala:1114)
	at org.scalatest.Suite.run$(Suite.scala:1096)
	at org.scalatest.funsuite.AsyncFunSuite.org$scalatest$funsuite$AsyncFunSuiteLike$$super$run(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.$anonfun$run$1(AsyncFunSuiteLike.scala:256)
	at org.scalatest.AsyncSuperEngine.runImpl(AsyncEngine.scala:625)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run(AsyncFunSuiteLike.scala:256)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run$(AsyncFunSuiteLike.scala:255)
	at sttp.tapir.client.tests.ClientTests.org$scalatest$BeforeAndAfterAll$$super$run(ClientTests.scala:15)
	at org.scalatest.BeforeAndAfterAll.liftedTree1$1(BeforeAndAfterAll.scala:213)
	at org.scalatest.BeforeAndAfterAll.run(BeforeAndAfterAll.scala:210)
	at org.scalatest.BeforeAndAfterAll.run$(BeforeAndAfterAll.scala:208)
	at sttp.tapir.client.tests.ClientTests.run(ClientTests.scala:15)
	at org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:321)
	at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:517)
	at sbt.TestRunner.runTest$1(TestFramework.scala:153)
	at sbt.TestRunner.run(TestFramework.scala:168)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.$anonfun$apply$1(TestFramework.scala:336)
	at sbt.TestFramework$.sbt$TestFramework$$withContextLoader(TestFramework.scala:296)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFunction.apply(TestFramework.scala:348)
	at sbt.Tests$.processRunnable$1(Tests.scala:475)
	at sbt.Tests$.$anonfun$makeSerial$1(Tests.scala:481)
	at sbt.std.Transform$$anon$3.$anonfun$apply$2(Transform.scala:47)
	at sbt.std.Transform$$anon$4.work(Transform.scala:69)
	at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
	at sbt.Execute.work(Execute.scala:292)
	at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
case (Some(streams), _) => asStreamAlwaysUnsafe(streams)
case (_, true) => asWebSocketAlwaysUnsafe
case (_, true) => async.asWebSocketAlwaysUnsafe
case (None, false) =>
out.bodyType
.map {
Expand All @@ -220,7 +218,7 @@ private[sttp] class EndpointToSttpClient[R](clientOptions: SttpClientOptions, ws
case RawBodyType.MultipartBody(_, _) => throw new IllegalArgumentException("Multipart bodies aren't supported in responses")
}
.getOrElse(ignore)

Check failure on line 220 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 3-JVM-11

sttp.tapir.client.sttp4.SttpClientWebSocketPekkoTests ► web sockets, string client-terminated echo

Failed test found in: client/sttp-client4/target/jvm-3/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientWebSocketPekkoTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:220)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.toSttpRequest$$anonfun$1$$anonfun$1(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.toSecureRequestThrowDecodeFailures$$anonfun$1$$anonfun$1(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientPekkoTests.send$$anonfun$1(SttpClientPekkoTests.scala:33)
	at apply @ sttp.tapir.client.sttp4.SttpClientPekkoTests.send(SttpClientPekkoTests.scala:35)
	at fromFuture @ sttp.tapir.client.tests.ClientTests.doAdjust$1(ClientTests.scala:33)
	at flatMap @ sttp.tapir.client.tests.ClientWebSocketTests.testFun$proxy1$1(ClientWebSocketTests.scala:26)
	at map @ sttp.tapir.client.tests.ClientWebSocketTests.testFun$proxy1$1(ClientWebSocketTests.scala:29)

Check failure on line 220 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 3-JVM-11

sttp.tapir.client.sttp4.SttpClientWebSocketPekkoTests ► web sockets, json client-terminated echo

Failed test found in: client/sttp-client4/target/jvm-3/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientWebSocketPekkoTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:220)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.toSttpRequest$$anonfun$1$$anonfun$1(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.toSecureRequestThrowDecodeFailures$$anonfun$1$$anonfun$1(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientPekkoTests.send$$anonfun$1(SttpClientPekkoTests.scala:33)
	at apply @ sttp.tapir.client.sttp4.SttpClientPekkoTests.send(SttpClientPekkoTests.scala:35)
	at fromFuture @ sttp.tapir.client.tests.ClientTests.doAdjust$1(ClientTests.scala:33)
	at flatMap @ sttp.tapir.client.tests.ClientWebSocketTests.testFun$proxy2$1(ClientWebSocketTests.scala:41)
	at map @ sttp.tapir.client.tests.ClientWebSocketTests.testFun$proxy2$1(ClientWebSocketTests.scala:44)

Check failure on line 220 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 3-JVM-11

sttp.tapir.client.sttp4.SttpClientWebSocketPekkoTests ► web sockets, client-terminated echo using fragmented frames

Failed test found in: client/sttp-client4/target/jvm-3/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientWebSocketPekkoTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:220)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.toSttpRequest$$anonfun$1$$anonfun$1(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.toSecureRequestThrowDecodeFailures$$anonfun$1$$anonfun$1(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientPekkoTests.send$$anonfun$1(SttpClientPekkoTests.scala:33)
	at apply @ sttp.tapir.client.sttp4.SttpClientPekkoTests.send(SttpClientPekkoTests.scala:35)
	at fromFuture @ sttp.tapir.client.tests.ClientTests.doAdjust$1(ClientTests.scala:33)
	at flatMap @ sttp.tapir.client.tests.ClientWebSocketTests.testFun$proxy3$1(ClientWebSocketTests.scala:58)
	at map @ sttp.tapir.client.tests.ClientWebSocketTests.testFun$proxy3$1(ClientWebSocketTests.scala:61)

Check failure on line 220 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 3-JVM-11

sttp.tapir.client.sttp4.SttpClientWebSocketTests ► web sockets, string client-terminated echo

Failed test found in: client/sttp-client4/target/jvm-3/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientWebSocketTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:220)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.toSttpRequest$$anonfun$1$$anonfun$1(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.toSecureRequestThrowDecodeFailures$$anonfun$1$$anonfun$1(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientTests.send(SttpClientTests.scala:29)
	at sttp.tapir.client.tests.ClientWebSocketTests.testFun$proxy1$1(ClientWebSocketTests.scala:24)
	at sttp.tapir.client.tests.ClientWebSocketTests.webSocketTests$$anonfun$1(ClientWebSocketTests.scala:18)
	at org.scalatest.AsyncTestSuite.transformToOutcome$$anonfun$1(AsyncTestSuite.scala:240)
	at org.scalatest.funsuite.AsyncFunSuiteLike$$anon$1.apply(AsyncFunSuiteLike.scala:187)
	at org.scalatest.AsyncTestSuite.withFixture(AsyncTestSuite.scala:316)
	at org.scalatest.AsyncTestSuite.withFixture$(AsyncTestSuite.scala:214)
	at org.scalatest.funsuite.AsyncFunSuite.withFixture(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.invokeWithAsyncFixture$1(AsyncFunSuiteLike.scala:193)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest$$anonfun$1(AsyncFunSuiteLike.scala:199)
	at org.scalatest.AsyncSuperEngine.runTestImpl(AsyncEngine.scala:374)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest(AsyncFunSuiteLike.scala:199)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest$(AsyncFunSuiteLike.scala:47)
	at org.scalatest.funsuite.AsyncFunSuite.runTest(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests$$anonfun$1(AsyncFunSuiteLike.scala:232)
	at org.scalatest.AsyncSuperEngine.traverseSubNodes$1$$anonfun$1(AsyncEngine.scala:432)
	at scala.collection.LinearSeqOps.foldLeft(LinearSeq.scala:183)
	at scala.collection.LinearSeqOps.foldLeft$(LinearSeq.scala:179)
	at scala.collection.immutable.List.foldLeft(List.scala:79)
	at org.scalatest.AsyncSuperEngine.traverseSubNodes$1(AsyncEngine.scala:469)
	at org.scalatest.AsyncSuperEngine.runTestsInBranch(AsyncEngine.scala:487)
	at org.scalatest.AsyncSuperEngine.runTestsImpl(AsyncEngine.scala:555)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests(AsyncFunSuiteLike.scala:232)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests$(AsyncFunSuiteLike.scala:47)
	at org.scalatest.funsuite.AsyncFunSuite.runTests(AsyncFunSuite.scala:2192)
	at org.scalatest.Suite.run(Suite.scala:1114)
	at org.scalatest.Suite.run$(Suite.scala:564)
	at org.scalatest.funsuite.AsyncFunSuite.org$scalatest$funsuite$AsyncFunSuiteLike$$super$run(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run$$anonfun$1(AsyncFunSuiteLike.scala:236)
	at org.scalatest.AsyncSuperEngine.runImpl(AsyncEngine.scala:625)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run(AsyncFunSuiteLike.scala:236)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run$(AsyncFunSuiteLike.scala:47)
	at sttp.tapir.client.tests.ClientTests.org$scalatest$BeforeAndAfterAll$$super$run(ClientTests.scala:15)
	at org.scalatest.BeforeAndAfterAll.liftedTree1$1(BeforeAndAfterAll.scala:213)
	at org.scalatest.BeforeAndAfterAll.run(BeforeAndAfterAll.scala:217)
	at org.scalatest.BeforeAndAfterAll.run$(BeforeAndAfterAll.scala:135)
	at sttp.tapir.client.tests.ClientTests.run(ClientTests.scala:15)
	at org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:321)
	at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:517)
	at sbt.TestRunner.runTest$1(TestFramework.scala:153)
	at sbt.TestRunner.run(TestFramework.scala:168)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.$anonfun$apply$1(TestFramework.scala:336)
	at sbt.TestFramework$.sbt$TestFramework$$withContextLoader(TestFramework.scala:296)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFunction.apply(TestFramework.scala:348)
	at sbt.Tests$.processRunnable$1(Tests.scala:475)
	at sbt.Tests$.$anonfun$makeSerial$1(Tests.scala:481)
	at sbt.std.Transform$$anon$3.$anonfun$apply$2(Transform.scala:47)
	at sbt.std.Transform$$anon$4.work(Transform.scala:69)
	at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
	at sbt.Execute.work(Execute.scala:292)
	at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

Check failure on line 220 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 3-JVM-11

sttp.tapir.client.sttp4.SttpClientWebSocketTests ► web sockets, json client-terminated echo

Failed test found in: client/sttp-client4/target/jvm-3/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientWebSocketTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:220)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.toSttpRequest$$anonfun$1$$anonfun$1(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.toSecureRequestThrowDecodeFailures$$anonfun$1$$anonfun$1(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientTests.send(SttpClientTests.scala:29)
	at sttp.tapir.client.tests.ClientWebSocketTests.testFun$proxy2$1(ClientWebSocketTests.scala:39)
	at sttp.tapir.client.tests.ClientWebSocketTests.webSocketTests$$anonfun$2(ClientWebSocketTests.scala:33)
	at org.scalatest.AsyncTestSuite.transformToOutcome$$anonfun$1(AsyncTestSuite.scala:240)
	at org.scalatest.funsuite.AsyncFunSuiteLike$$anon$1.apply(AsyncFunSuiteLike.scala:187)
	at org.scalatest.AsyncTestSuite.withFixture(AsyncTestSuite.scala:316)
	at org.scalatest.AsyncTestSuite.withFixture$(AsyncTestSuite.scala:214)
	at org.scalatest.funsuite.AsyncFunSuite.withFixture(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.invokeWithAsyncFixture$1(AsyncFunSuiteLike.scala:193)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest$$anonfun$1(AsyncFunSuiteLike.scala:199)
	at org.scalatest.AsyncSuperEngine.runTestImpl(AsyncEngine.scala:374)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest(AsyncFunSuiteLike.scala:199)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest$(AsyncFunSuiteLike.scala:47)
	at org.scalatest.funsuite.AsyncFunSuite.runTest(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests$$anonfun$1(AsyncFunSuiteLike.scala:232)
	at org.scalatest.AsyncSuperEngine.traverseSubNodes$1$$anonfun$1$$anonfun$2(AsyncEngine.scala:435)
	at org.scalatest.Status.thenRun$$anonfun$1(Status.scala:227)
	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
	at org.scalatest.FailedStatus$.whenCompleted(Status.scala:505)
	at org.scalatest.Status.thenRun(Status.scala:251)
	at org.scalatest.Status.thenRun$(Status.scala:54)
	at org.scalatest.FailedStatus$.thenRun(Status.scala:477)
	at org.scalatest.AsyncSuperEngine.traverseSubNodes$1$$anonfun$1(AsyncEngine.scala:435)
	at scala.collection.LinearSeqOps.foldLeft(LinearSeq.scala:183)
	at scala.collection.LinearSeqOps.foldLeft$(LinearSeq.scala:179)
	at scala.collection.immutable.List.foldLeft(List.scala:79)
	at org.scalatest.AsyncSuperEngine.traverseSubNodes$1(AsyncEngine.scala:469)
	at org.scalatest.AsyncSuperEngine.runTestsInBranch(AsyncEngine.scala:487)
	at org.scalatest.AsyncSuperEngine.runTestsImpl(AsyncEngine.scala:555)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests(AsyncFunSuiteLike.scala:232)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests$(AsyncFunSuiteLike.scala:47)
	at org.scalatest.funsuite.AsyncFunSuite.runTests(AsyncFunSuite.scala:2192)
	at org.scalatest.Suite.run(Suite.scala:1114)
	at org.scalatest.Suite.run$(Suite.scala:564)
	at org.scalatest.funsuite.AsyncFunSuite.org$scalatest$funsuite$AsyncFunSuiteLike$$super$run(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run$$anonfun$1(AsyncFunSuiteLike.scala:236)
	at org.scalatest.AsyncSuperEngine.runImpl(AsyncEngine.scala:625)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run(AsyncFunSuiteLike.scala:236)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run$(AsyncFunSuiteLike.scala:47)
	at sttp.tapir.client.tests.ClientTests.org$scalatest$BeforeAndAfterAll$$super$run(ClientTests.scala:15)
	at org.scalatest.BeforeAndAfterAll.liftedTree1$1(BeforeAndAfterAll.scala:213)
	at org.scalatest.BeforeAndAfterAll.run(BeforeAndAfterAll.scala:217)
	at org.scalatest.BeforeAndAfterAll.run$(BeforeAndAfterAll.scala:135)
	at sttp.tapir.client.tests.ClientTests.run(ClientTests.scala:15)
	at org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:321)
	at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:517)
	at sbt.TestRunner.runTest$1(TestFramework.scala:153)
	at sbt.TestRunner.run(TestFramework.scala:168)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.$anonfun$apply$1(TestFramework.scala:336)
	at sbt.TestFramework$.sbt$TestFramework$$withContextLoader(TestFramework.scala:296)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFunction.apply(TestFramework.scala:348)
	at sbt.Tests$.processRunnable$1(Tests.scala:475)
	at sbt.Tests$.$anonfun$makeSerial$1(Tests.scala:481)
	at sbt.std.Transform$$anon$3.$anonfun$apply$2(Transform.scala:47)
	at sbt.std.Transform$$anon$4.work(Transform.scala:69)
	at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
	at sbt.Execute.work(Execute.scala:292)
	at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

Check failure on line 220 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 3-JVM-11

sttp.tapir.client.sttp4.SttpClientWebSocketTests ► web sockets, client-terminated echo using fragmented frames

Failed test found in: client/sttp-client4/target/jvm-3/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientWebSocketTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:220)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.toSttpRequest$$anonfun$1$$anonfun$1(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.toSecureRequestThrowDecodeFailures$$anonfun$1$$anonfun$1(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientTests.send(SttpClientTests.scala:29)
	at sttp.tapir.client.tests.ClientWebSocketTests.testFun$proxy3$1(ClientWebSocketTests.scala:56)
	at sttp.tapir.client.tests.ClientWebSocketTests.webSocketTests$$anonfun$3(ClientWebSocketTests.scala:48)
	at org.scalatest.AsyncTestSuite.transformToOutcome$$anonfun$1(AsyncTestSuite.scala:240)
	at org.scalatest.funsuite.AsyncFunSuiteLike$$anon$1.apply(AsyncFunSuiteLike.scala:187)
	at org.scalatest.AsyncTestSuite.withFixture(AsyncTestSuite.scala:316)
	at org.scalatest.AsyncTestSuite.withFixture$(AsyncTestSuite.scala:214)
	at org.scalatest.funsuite.AsyncFunSuite.withFixture(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.invokeWithAsyncFixture$1(AsyncFunSuiteLike.scala:193)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest$$anonfun$1(AsyncFunSuiteLike.scala:199)
	at org.scalatest.AsyncSuperEngine.runTestImpl(AsyncEngine.scala:374)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest(AsyncFunSuiteLike.scala:199)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTest$(AsyncFunSuiteLike.scala:47)
	at org.scalatest.funsuite.AsyncFunSuite.runTest(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests$$anonfun$1(AsyncFunSuiteLike.scala:232)
	at org.scalatest.AsyncSuperEngine.traverseSubNodes$1$$anonfun$1$$anonfun$2(AsyncEngine.scala:435)
	at org.scalatest.Status.thenRun$$anonfun$1(Status.scala:227)
	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
	at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
	at org.scalatest.ScalaTestStatefulStatus.whenCompleted(Status.scala:648)
	at org.scalatest.Status.thenRun(Status.scala:251)
	at org.scalatest.Status.thenRun$(Status.scala:54)
	at org.scalatest.ScalaTestStatefulStatus.thenRun(Status.scala:511)
	at org.scalatest.AsyncSuperEngine.traverseSubNodes$1$$anonfun$1(AsyncEngine.scala:435)
	at scala.collection.LinearSeqOps.foldLeft(LinearSeq.scala:183)
	at scala.collection.LinearSeqOps.foldLeft$(LinearSeq.scala:179)
	at scala.collection.immutable.List.foldLeft(List.scala:79)
	at org.scalatest.AsyncSuperEngine.traverseSubNodes$1(AsyncEngine.scala:469)
	at org.scalatest.AsyncSuperEngine.runTestsInBranch(AsyncEngine.scala:487)
	at org.scalatest.AsyncSuperEngine.runTestsImpl(AsyncEngine.scala:555)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests(AsyncFunSuiteLike.scala:232)
	at org.scalatest.funsuite.AsyncFunSuiteLike.runTests$(AsyncFunSuiteLike.scala:47)
	at org.scalatest.funsuite.AsyncFunSuite.runTests(AsyncFunSuite.scala:2192)
	at org.scalatest.Suite.run(Suite.scala:1114)
	at org.scalatest.Suite.run$(Suite.scala:564)
	at org.scalatest.funsuite.AsyncFunSuite.org$scalatest$funsuite$AsyncFunSuiteLike$$super$run(AsyncFunSuite.scala:2192)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run$$anonfun$1(AsyncFunSuiteLike.scala:236)
	at org.scalatest.AsyncSuperEngine.runImpl(AsyncEngine.scala:625)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run(AsyncFunSuiteLike.scala:236)
	at org.scalatest.funsuite.AsyncFunSuiteLike.run$(AsyncFunSuiteLike.scala:47)
	at sttp.tapir.client.tests.ClientTests.org$scalatest$BeforeAndAfterAll$$super$run(ClientTests.scala:15)
	at org.scalatest.BeforeAndAfterAll.liftedTree1$1(BeforeAndAfterAll.scala:213)
	at org.scalatest.BeforeAndAfterAll.run(BeforeAndAfterAll.scala:217)
	at org.scalatest.BeforeAndAfterAll.run$(BeforeAndAfterAll.scala:135)
	at sttp.tapir.client.tests.ClientTests.run(ClientTests.scala:15)
	at org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:321)
	at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:517)
	at sbt.TestRunner.runTest$1(TestFramework.scala:153)
	at sbt.TestRunner.run(TestFramework.scala:168)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.$anonfun$apply$1(TestFramework.scala:336)
	at sbt.TestFramework$.sbt$TestFramework$$withContextLoader(TestFramework.scala:296)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:336)
	at sbt.TestFunction.apply(TestFramework.scala:348)
	at sbt.Tests$.processRunnable$1(Tests.scala:475)
	at sbt.Tests$.$anonfun$makeSerial$1(Tests.scala:481)
	at sbt.std.Transform$$anon$3.$anonfun$apply$2(Transform.scala:47)
	at sbt.std.Transform$$anon$4.work(Transform.scala:69)
	at sbt.Execute.$anonfun$submit$2(Execute.scala:283)
	at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:24)
	at sbt.Execute.work(Execute.scala:292)
	at sbt.Execute.$anonfun$submit$1(Execute.scala:283)
	at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:65)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

Check failure on line 220 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 3-JVM-11

sttp.tapir.client.sttp4.SttpClientWebSocketTests ► web sockets, string echo, custom header

Failed test found in: client/sttp-client4/target/jvm-3/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientWebSocketTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:220)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.toSttpRequest$$anonfun$1$$anonfun$1(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.toSecureRequestThrowDecodeFailures$$anonfun$1$$anonfun$1(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientWebSocketTests.sendAsResponse$1(SttpClientWebSocketTests.scala:39)
	at sttp.tapir.client.sttp4.SttpClientWebSocketTests.testFun$proxy1$1$$anonfun$1(SttpClientWebSocketTests.scala:50)
	at delay @ sttp.client4.httpclient.fs2.HttpClientFs2Backend$.apply$$anonfun$1(HttpClientFs2Backend.scala:120)
	at executor @ sttp.client4.httpclient.fs2.HttpClientFs2Backend$.apply(HttpClientFs2Backend.scala:112)
	at flatMap @ sttp.client4.httpclient.fs2.HttpClientFs2Backend$.apply(HttpClientFs2Backend.scala:112)
	at use @ fs2.Compiler$Target.compile(Compiler.scala:158)

Check failure on line 220 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 3-JVM-11

sttp.tapir.client.sttp4.SttpClientWebSocketZioTests ► web sockets, string client-terminated echo

Failed test found in: client/sttp-client4/target/jvm-3/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientWebSocketZioTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:220)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.toSttpRequest$$anonfun$1$$anonfun$1(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.toSecureRequestThrowDecodeFailures$$anonfun$1$$anonfun$1(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientZioTests.send$$anonfun$1(SttpClientZioTests.scala:31)
	at delay @ sttp.tapir.client.sttp4.SttpClientZioTests.send(SttpClientZioTests.scala:35)
	at fromFuture @ sttp.tapir.client.tests.ClientTests.doAdjust$1(ClientTests.scala:33)
	at flatMap @ sttp.tapir.client.tests.ClientWebSocketTests.testFun$proxy1$1(ClientWebSocketTests.scala:26)
	at map @ sttp.tapir.client.tests.ClientWebSocketTests.testFun$proxy1$1(ClientWebSocketTests.scala:29)

Check failure on line 220 in client/sttp-client4/src/main/scala/sttp/tapir/client/sttp4/EndpointToSttpClient.scala

View workflow job for this annotation

GitHub Actions / Test report for 3-JVM-11

sttp.tapir.client.sttp4.SttpClientWebSocketZioTests ► web sockets, json client-terminated echo

Failed test found in: client/sttp-client4/target/jvm-3/test-reports/TEST-sttp.tapir.client.sttp4.SttpClientWebSocketZioTests.xml Error: java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe)
Raw output
java.lang.ClassCastException: class sttp.client4.WebSocketResponseAs cannot be cast to class sttp.client4.ResponseAs (sttp.client4.WebSocketResponseAs and sttp.client4.ResponseAs are in unnamed module of loader sbt.internal.LayeredClassLoader @1c413dbe)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.responseAsFromOutputs(EndpointToSttpClient.scala:220)
	at sttp.tapir.client.sttp4.EndpointToSttpClient.toSttpRequest$$anonfun$1$$anonfun$1(EndpointToSttpClient.scala:44)
	at sttp.tapir.client.sttp4.SttpClientInterpreter.toSecureRequestThrowDecodeFailures$$anonfun$1$$anonfun$1(SttpClientInterpreter.scala:180)
	at sttp.tapir.client.sttp4.SttpClientZioTests.send$$anonfun$1(SttpClientZioTests.scala:31)
	at delay @ sttp.tapir.client.sttp4.SttpClientZioTests.send(SttpClientZioTests.scala:35)
	at fromFuture @ sttp.tapir.client.tests.ClientTests.doAdjust$1(ClientTests.scala:33)
	at flatMap @ sttp.tapir.client.tests.ClientWebSocketTests.testFun$proxy2$1(ClientWebSocketTests.scala:41)
	at map @ sttp.tapir.client.tests.ClientWebSocketTests.testFun$proxy2$1(ClientWebSocketTests.scala:44)
}).asInstanceOf[ResponseAs[Any, Any]]
}).asInstanceOf[ResponseAs[Any]]
}

private def bodyIsStream[I](out: EndpointOutput[I]): Option[Streams[_]] = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package sttp.tapir.client.sttp
package sttp.tapir.client.sttp4

import sttp.client4.{Request, SttpBackend}
import sttp.client4.{Backend, Request}
import sttp.model.Uri
import sttp.tapir.{DecodeResult, Endpoint, PublicEndpoint}

Expand All @@ -17,11 +17,12 @@ trait SttpClientInterpreter extends SttpClientInterpreterExtensions {
* parameters: path, query, headers and body. The request is sent using the given backend, and the result of decoding the response (error
* or success value) is returned.
*/
def toClient[F[_], I, E, O, R](e: PublicEndpoint[I, E, O, R], baseUri: Option[Uri], backend: SttpBackend[F, R])(implicit
def toClient[F[_], I, E, O, R](e: PublicEndpoint[I, E, O, R], baseUri: Option[Uri], backend: Backend[F])(implicit
wsToPipe: WebSocketToPipe[R]
): I => F[DecodeResult[Either[E, O]]] = {
val req = toRequest(e, baseUri)
(i: I) => backend.responseMonad.map(backend.send(req(i)))(_.body)
(i: I) =>
val req = toRequest(e, baseUri)
backend.monad.map(req(i).send(backend))(_.body)
}

/** Interprets the public endpoint as a client call, using the given `baseUri` as the starting point to create the target uri. If
Expand All @@ -31,11 +32,11 @@ trait SttpClientInterpreter extends SttpClientInterpreterExtensions {
* parameters: path, query, headers and body. The request is sent using the given backend, and the result (error or success value) is
* returned. If decoding the result fails, a failed effect is returned instead.
*/
def toClientThrowDecodeFailures[F[_], I, E, O, R](e: PublicEndpoint[I, E, O, R], baseUri: Option[Uri], backend: SttpBackend[F, R])(
def toClientThrowDecodeFailures[F[_], I, E, O, R](e: PublicEndpoint[I, E, O, R], baseUri: Option[Uri], backend: Backend[F])(
implicit wsToPipe: WebSocketToPipe[R]
): I => F[Either[E, O]] = {
val req = toRequestThrowDecodeFailures(e, baseUri)
(i: I) => backend.responseMonad.map(backend.send(req(i)))(_.body)
(i: I) => backend.monad.map(req(i).send(backend))(_.body)
}

/** Interprets the public endpoint as a client call, using the given `baseUri` as the starting point to create the target uri. If
Expand All @@ -45,11 +46,11 @@ trait SttpClientInterpreter extends SttpClientInterpreterExtensions {
* parameters: path, query, headers and body. The request is sent using the given backend, and the result (success value) is returned. If
* decoding the result fails, or if the response corresponds to an error value, a failed effect is returned instead.
*/
def toClientThrowErrors[F[_], I, E, O, R](e: PublicEndpoint[I, E, O, R], baseUri: Option[Uri], backend: SttpBackend[F, R])(implicit
def toClientThrowErrors[F[_], I, E, O, R](e: PublicEndpoint[I, E, O, R], baseUri: Option[Uri], backend: Backend[F])(implicit
wsToPipe: WebSocketToPipe[R]
): I => F[O] = {
val req = toRequestThrowErrors(e, baseUri)
(i: I) => backend.responseMonad.map(backend.send(req(i)))(_.body)
(i: I) => backend.monad.map(req(i).send(backend))(_.body)
}

/** Interprets the public endpoint as a client call, using the given `baseUri` as the starting point to create the target uri. If
Expand All @@ -62,8 +63,9 @@ trait SttpClientInterpreter extends SttpClientInterpreterExtensions {
*/
def toRequest[I, E, O, R](e: PublicEndpoint[I, E, O, R], baseUri: Option[Uri])(implicit
wsToPipe: WebSocketToPipe[R]
): I => Request[DecodeResult[Either[E, O]], R] =
): I => Request[DecodeResult[Either[E, O]]] = {
new EndpointToSttpClient(sttpClientOptions, wsToPipe).toSttpRequest(e, baseUri).apply(())
}

/** Interprets the public endpoint as a client call, using the given `baseUri` as the starting point to create the target uri. If
* `baseUri` is not provided, the request will be a relative one.
Expand All @@ -75,7 +77,7 @@ trait SttpClientInterpreter extends SttpClientInterpreterExtensions {
*/
def toRequestThrowDecodeFailures[I, E, O, R](e: PublicEndpoint[I, E, O, R], baseUri: Option[Uri])(implicit
wsToPipe: WebSocketToPipe[R]
): I => Request[Either[E, O], R] =
): I => Request[Either[E, O]] =
i => new EndpointToSttpClient(sttpClientOptions, wsToPipe).toSttpRequest(e, baseUri).apply(()).apply(i).mapResponse(throwDecodeFailures)

/** Interprets the public endpoint as a client call, using the given `baseUri` as the starting point to create the target uri. If
Expand All @@ -91,7 +93,7 @@ trait SttpClientInterpreter extends SttpClientInterpreterExtensions {
*/
def toRequestThrowErrors[I, E, O, R](e: PublicEndpoint[I, E, O, R], baseUri: Option[Uri])(implicit
wsToPipe: WebSocketToPipe[R]
): I => Request[O, R] =
): I => Request[O] =
i =>
new EndpointToSttpClient(sttpClientOptions, wsToPipe)
.toSttpRequest(e, baseUri)
Expand All @@ -113,11 +115,11 @@ trait SttpClientInterpreter extends SttpClientInterpreterExtensions {
* appropriate request parameters: path, query, headers and body. The request is sent using the given backend, and the result of decoding
* the response (error or success value) is returned.
*/
def toSecureClient[F[_], A, I, E, O, R](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri], backend: SttpBackend[F, R])(implicit
def toSecureClient[F[_], A, I, E, O, R](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri], backend: Backend[F])(implicit
wsToPipe: WebSocketToPipe[R]
): A => I => F[DecodeResult[Either[E, O]]] = {
val req = toSecureRequest(e, baseUri)
(a: A) => (i: I) => backend.responseMonad.map(backend.send(req(a)(i)))(_.body)
(a: A) => (i: I) => backend.monad.map(backend.send(req(a)(i)))(_.body)
}

/** Interprets the secure endpoint as a client call, using the given `baseUri` as the starting point to create the target uri. If
Expand All @@ -127,11 +129,11 @@ trait SttpClientInterpreter extends SttpClientInterpreterExtensions {
* appropriate request parameters: path, query, headers and body. The request is sent using the given backend, and the result (error or
* success value) is returned. If decoding the result fails, a failed effect is returned instead.
*/
def toSecureClientThrowDecodeFailures[F[_], A, I, E, O, R](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri], backend: SttpBackend[F, R])(
def toSecureClientThrowDecodeFailures[F[_], A, I, E, O, R](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri], backend: Backend[F])(
implicit wsToPipe: WebSocketToPipe[R]
): A => I => F[Either[E, O]] = {
val req = toSecureRequestThrowDecodeFailures(e, baseUri)
(a: A) => (i: I) => backend.responseMonad.map(backend.send(req(a)(i)))(_.body)
(a: A) => (i: I) => backend.monad.map(backend.send(req(a)(i)))(_.body)
}

/** Interprets the secure endpoint as a client call, using the given `baseUri` as the starting point to create the target uri. If
Expand All @@ -142,11 +144,11 @@ trait SttpClientInterpreter extends SttpClientInterpreterExtensions {
* value) is returned. If decoding the result fails, or if the response corresponds to an error value, a failed effect is returned
* instead.
*/
def toSecureClientThrowErrors[F[_], A, I, E, O, R](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri], backend: SttpBackend[F, R])(implicit
def toSecureClientThrowErrors[F[_], A, I, E, O, R](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri], backend: Backend[F])(implicit
wsToPipe: WebSocketToPipe[R]
): A => I => F[O] = {
val req = toSecureRequestThrowErrors(e, baseUri)
(a: A) => (i: I) => backend.responseMonad.map(backend.send(req(a)(i)))(_.body)
(a: A) => (i: I) => backend.monad.map(backend.send(req(a)(i)))(_.body)
}

/** Interprets the secure endpoint as a client call, using the given `baseUri` as the starting point to create the target uri. If
Expand All @@ -159,7 +161,7 @@ trait SttpClientInterpreter extends SttpClientInterpreterExtensions {
*/
def toSecureRequest[A, I, E, O, R](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri])(implicit
wsToPipe: WebSocketToPipe[R]
): A => I => Request[DecodeResult[Either[E, O]], R] =
): A => I => Request[DecodeResult[Either[E, O]]] =
new EndpointToSttpClient(sttpClientOptions, wsToPipe).toSttpRequest(e, baseUri)

/** Interprets the secure endpoint as a client call, using the given `baseUri` as the starting point to create the target uri. If
Expand All @@ -172,7 +174,7 @@ trait SttpClientInterpreter extends SttpClientInterpreterExtensions {
*/
def toSecureRequestThrowDecodeFailures[A, I, E, O, R](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri])(implicit
wsToPipe: WebSocketToPipe[R]
): A => I => Request[Either[E, O], R] =
): A => I => Request[Either[E, O]] =
a =>
i =>
new EndpointToSttpClient(sttpClientOptions, wsToPipe).toSttpRequest(e, baseUri).apply(a).apply(i).mapResponse(throwDecodeFailures)
Expand All @@ -190,7 +192,7 @@ trait SttpClientInterpreter extends SttpClientInterpreterExtensions {
*/
def toSecureRequestThrowErrors[A, I, E, O, R](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri])(implicit
wsToPipe: WebSocketToPipe[R]
): A => I => Request[O, R] =
): A => I => Request[O] =
a =>
i =>
new EndpointToSttpClient(sttpClientOptions, wsToPipe)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package sttp.tapir.client.sttp
package sttp.tapir.client.sttp4

import sttp.tapir.{Defaults, TapirFile}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package sttp.tapir.client.sttp
package sttp.tapir.client.sttp4

import sttp.capabilities.Streams
import sttp.tapir.WebSocketBodyOutput
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package sttp.tapir.client.sttp
package sttp.tapir.client.sttp4

import sttp.model.StatusCode

private[sttp] trait EndpointToSttpClientExtensions { this: EndpointToSttpClient[_] =>
private[sttp4] trait EndpointToSttpClientExtensions { this: EndpointToSttpClient[_] =>

/** This needs to be platform-specific due to #2663, as on JS we don't get access to the 101 status code. */
val webSocketSuccessStatusCode: StatusCode = StatusCode.Ok
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package sttp.tapir.client.sttp
package sttp.tapir.client.sttp4

import sttp.client3.{FetchBackend, SttpBackend}
import sttp.model.Uri
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package sttp.tapir.client.sttp.ws.fs2
package sttp.tapir.client.sttp4.ws.fs2

import cats.effect.Concurrent
import sttp.capabilities.WebSockets
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package sttp.tapir.client.sttp.ws.fs2
package sttp.tapir.client.sttp4.ws.fs2

import _root_.fs2._
import cats.MonadError
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package sttp.tapir.client.sttp.ws
package sttp.tapir.client.sttp4.ws

package object fs2 extends TapirSttpClientFs2WebSockets
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package sttp.tapir.client.sttp.ws.zio
package sttp.tapir.client.sttp4.ws.zio

import sttp.capabilities.WebSockets
import sttp.capabilities.zio.ZioStreams
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package sttp.tapir.client.sttp.ws.zio
package sttp.tapir.client.sttp4.ws.zio

import sttp.capabilities.WebSockets
import sttp.capabilities.zio.ZioStreams
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package sttp.tapir.client.sttp.ws
package sttp.tapir.client.sttp4.ws

package object zio extends TapirSttpClientZioWebSockets
Loading

0 comments on commit 2ccf35b

Please sign in to comment.