Skip to content

Commit f2540dc

Browse files
Set ElasticSearch container ES_JAVA_OPTS and disable disk-based shard allocation thresholds
1 parent aef77cf commit f2540dc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

integration-tests/elasticsearch-rest-client/src/test/java/org/apache/camel/quarkus/component/elasticsearch/rest/client/it/ElasticsearchRestTestResource.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public Map<String, String> start() {
6868
container = new GenericContainer<>(ELASTICSEARCH_IMAGE)
6969
.withExposedPorts(ELASTICSEARCH_PORT)
7070
.withLogConsumer(new Slf4jLogConsumer(LOGGER))
71+
.withEnv("cluster.routing.allocation.disk.threshold_enabled", "false")
7172
.withEnv("discovery.type", "single-node")
7273
.withEnv("http.publish_host", DockerClientFactory.instance().dockerHostIpAddress())
7374
.withEnv("xpack.security.enabled", "true")
@@ -80,6 +81,7 @@ public Map<String, String> start() {
8081
.withEnv("action.destructive_requires_name", "false") // needed for deleting all indexes after each test (allowing _all wildcard)
8182
.withEnv("ELASTIC_USERNAME", ELASTICSEARCH_USERNAME)
8283
.withEnv("ELASTIC_PASSWORD", ELASTICSEARCH_PASSWORD)
84+
.withEnv("ES_JAVA_OPTS", "-Xms512m -Xmx512m")
8385
.withCopyToContainer(
8486
Transferable.of(Files.readAllBytes(Paths.get("target/certs/elasticsearch-keystore.p12"))),
8587
"/usr/share/elasticsearch/config/certs/elasticsearch-keystore.p12")

0 commit comments

Comments
 (0)