Skip to content

Commit 69555ee

Browse files
authored
Disable default disk threshold check in ElasticsearchContainer (#7245)
1 parent c5732a8 commit 69555ee

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

modules/elasticsearch/src/main/java/org/testcontainers/elasticsearch/ElasticsearchContainer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ public ElasticsearchContainer(final DockerImageName dockerImageName) {
9898

9999
withNetworkAliases("elasticsearch-" + Base58.randomString(6));
100100
withEnv("discovery.type", "single-node");
101+
// disable disk threshold checks
102+
withEnv("cluster.routing.allocation.disk.threshold_enabled", "false");
101103
// Sets default memory of elasticsearch instance to 2GB
102104
// Spaces are deliberate to allow user to define additional jvm options as elasticsearch resolves option files lexicographically
103105
withClasspathResourceMapping(

0 commit comments

Comments
 (0)