Skip to content

Commit

Permalink
chore: Minor dependency updates (#3438)
Browse files Browse the repository at this point in the history
Co-authored-by: Christian Kleinbölting <[email protected]>
Co-authored-by: Christian Kleinbölting <[email protected]>
  • Loading branch information
3 people authored Dec 19, 2024
1 parent c87233b commit d31a55f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
8 changes: 5 additions & 3 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

0 comments on commit d31a55f

Please sign in to comment.