From d31a55fc9d67052119879ad9807e2f0a9528fc0e Mon Sep 17 00:00:00 2001 From: DaSCH Bot <50987250+daschbot@users.noreply.github.com> Date: Thu, 19 Dec 2024 18:47:35 +0800 Subject: [PATCH] chore: Minor dependency updates (#3438) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Christian Kleinbölting Co-authored-by: Christian Kleinbölting --- project/Dependencies.scala | 8 +++++--- .../domain/service/DspIngestClientLiveSpec.scala | 13 ++++--------- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index e3ac451a02..0f6f205bdd 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -25,11 +25,11 @@ object Dependencies { // topbraid/shacl is not yet compatible with jena 5 so we need to use jena 4 for now // see: https://github.com/TopQuadrant/shacl/pull/177 val JenaVersion = "4.10.0" - val Rdf4jVersion = "5.0.3" + val Rdf4jVersion = "5.1.0" val TopbraidShaclVersion = "1.4.3" val ZioConfigVersion = "4.0.2" - val ZioLoggingVersion = "2.3.2" + val ZioLoggingVersion = "2.4.0" val ZioNioVersion = "2.0.2" val ZioMetricsConnectorsVersion = "2.3.1" val ZioPreludeVersion = "1.0.0-RC35" @@ -122,7 +122,9 @@ object Dependencies { val scalaTest = "org.scalatest" %% "scalatest" % "3.2.19" val testcontainers = "org.testcontainers" % "testcontainers" % "1.20.4" - val wiremock = "org.wiremock" % "wiremock" % "3.9.2" + + // use version 3.9.2 until https://github.com/wiremock/wiremock/issues/2911 is fixed + val wiremock = "org.wiremock" % "wiremock" % "3.9.2" // found/added by the plugin but deleted anyway val commonsLang3 = "org.apache.commons" % "commons-lang3" % "3.17.0" diff --git a/webapi/src/test/scala/org/knora/webapi/slice/admin/domain/service/DspIngestClientLiveSpec.scala b/webapi/src/test/scala/org/knora/webapi/slice/admin/domain/service/DspIngestClientLiveSpec.scala index 70f73df5f4..f801536b1e 100644 --- a/webapi/src/test/scala/org/knora/webapi/slice/admin/domain/service/DspIngestClientLiveSpec.scala +++ b/webapi/src/test/scala/org/knora/webapi/slice/admin/domain/service/DspIngestClientLiveSpec.scala @@ -189,17 +189,12 @@ object HttpMockServer { val random: ULayer[TestPort] = ZLayer.fromZIO(Random.nextIntBetween(1000, 10_000).map(TestPort.apply)) } - private def acquireWireMockServer: ZIO[TestPort, Throwable, WireMockServer] = - ZIO.serviceWith[TestPort](_.value).flatMap { port => + val layer: ZLayer[Scope & TestPort, Throwable, WireMockServer] = + ZLayer.fromZIO(ZIO.acquireRelease(ZIO.serviceWithZIO[TestPort] { port => ZIO.attempt { - val server = new WireMockServer(options().port(port)); // No-args constructor will start on port 8080, no HTTPS + val server = new WireMockServer(options().port(port.value)) server.start() server } - } - - private def releaseWireMockServer(server: WireMockServer) = ZIO.attempt(server.stop()).logError.ignore - - val layer: ZLayer[Scope & TestPort, Throwable, WireMockServer] = - ZLayer.fromZIO(ZIO.acquireRelease(acquireWireMockServer)(releaseWireMockServer)) + })(server => ZIO.attempt(server.stop()).logError.orDie)) }