From fccb984422d5fe9b6b86e59e5de1d46dd8fe4b88 Mon Sep 17 00:00:00 2001 From: adamw Date: Tue, 1 Jun 2021 17:23:48 +0200 Subject: [PATCH] Enable more projects for scala3 --- build.sbt | 6 +++--- .../sttp/client3/opentracing/OpenTracingBackendTest.scala | 8 +++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/build.sbt b/build.sbt index cbb67a242d..7300d7cf9f 100644 --- a/build.sbt +++ b/build.sbt @@ -831,7 +831,7 @@ lazy val openTracingBackend = (projectMatrix in file("metrics/open-tracing-backe ), scalaTest ) - .jvmPlatform(scalaVersions = scala2) + .jvmPlatform(scalaVersions = scala2 ++ scala3) .dependsOn(core) lazy val prometheusBackend = (projectMatrix in file("metrics/prometheus-backend")) @@ -843,7 +843,7 @@ lazy val prometheusBackend = (projectMatrix in file("metrics/prometheus-backend" ), scalaTest ) - .jvmPlatform(scalaVersions = scala2) + .jvmPlatform(scalaVersions = scala2 ++ scala3) .dependsOn(core) lazy val zioTelemetryOpenTelemetryBackend = (projectMatrix in file("metrics/zio-telemetry-open-telemetry-backend")) @@ -893,7 +893,7 @@ lazy val slf4jBackend = (projectMatrix in file("logging/slf4j")) ), scalaTest ) - .jvmPlatform(scalaVersions = scala2) + .jvmPlatform(scalaVersions = scala2 ++ scala3) .dependsOn(core) lazy val examplesCe2 = (projectMatrix in file("examples-ce2")) diff --git a/metrics/open-tracing-backend/src/test/scala/sttp/client3/opentracing/OpenTracingBackendTest.scala b/metrics/open-tracing-backend/src/test/scala/sttp/client3/opentracing/OpenTracingBackendTest.scala index e5c6e0d690..b7c7af9805 100644 --- a/metrics/open-tracing-backend/src/test/scala/sttp/client3/opentracing/OpenTracingBackendTest.scala +++ b/metrics/open-tracing-backend/src/test/scala/sttp/client3/opentracing/OpenTracingBackendTest.scala @@ -120,7 +120,13 @@ class OpenTracingBackendTest extends AnyFlatSpec with Matchers with BeforeAndAft val response = basicRequest.post(uri"http://stub/echo").send(backend) response.code shouldBe StatusCode.Ok - tracer.finishedSpans().asScala.head.tags().asScala(Tags.HTTP_STATUS.getKey) shouldBe StatusCode.Ok.code + tracer + .finishedSpans() + .asScala + .head + .tags() + .asScala(Tags.HTTP_STATUS.getKey) + .asInstanceOf[Int] shouldBe StatusCode.Ok.code } it should "add logs if response is error" in {