Skip to content

Commit fd340ae

Browse files
imsduSimon Dumas
andauthored
Add workaround to run Blazegraph and Elasticsearch tests on M4 chip (#5292)
Co-authored-by: Simon Dumas <simon.dumas@senscience.ai>
1 parent 887efbf commit fd340ae

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ val scalaTestVersion = "3.2.19"
5353
val scalaXmlVersion = "2.3.0"
5454
val titaniumJsonLdVersion = "1.5.0"
5555
val topBraidVersion = "1.4.4"
56-
val testContainersVersion = "1.20.4"
56+
val testContainersVersion = "1.20.5"
5757
val testContainersScalaVersion = "0.41.8"
5858

5959
lazy val akkaHttp = "com.typesafe.akka" %% "akka-http" % akkaHttpVersion

delta/testkit/src/main/scala/ch/epfl/bluebrain/nexus/testkit/blazegraph/BlazegraphContainer.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ import scala.jdk.DurationConverters.ScalaDurationOps
1111
class BlazegraphContainer
1212
extends GenericContainer[BlazegraphContainer](DockerImageName.parse("bluebrain/blazegraph-nexus:2.1.6-RC-21-jre")) {
1313
addEnv("JAVA_OPTS", "-Djava.awt.headless=true -XX:MaxDirectMemorySize=64m -Xmx256m -XX:+UseG1GC")
14+
// Workaround to run tests on a M4 chip
15+
addEnv("_JAVA_OPTIONS", sys.env.getOrElse("_JAVA_OPTIONS", ""))
1416
addExposedPort(9999)
1517
setWaitStrategy(Wait.forHttp("/blazegraph").forStatusCode(200))
1618
}

delta/testkit/src/main/scala/ch/epfl/bluebrain/nexus/testkit/elasticsearch/ElasticSearchContainer.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ class ElasticSearchContainer(password: String)
1919
addEnv("xpack.security.enabled", "true")
2020
addEnv("ingest.geoip.downloader.enabled", "false")
2121
addEnv("ELASTIC_PASSWORD", password)
22+
// Workaround to run tests on a M4 chip
23+
addEnv("_JAVA_OPTIONS", sys.env.getOrElse("_JAVA_OPTIONS", ""))
2224
addExposedPort(9200)
2325
setWaitStrategy(Wait.forLogMessage(".*(\"message\":\\s?\"started[\\s?|\"].*|] started\n$)", 1))
2426

0 commit comments

Comments
 (0)