From 312f0c17ede1ca943aff42c705e7f2885ac53afa Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Tue, 2 May 2023 14:37:13 +0200 Subject: [PATCH] Set initial ElasticSearch heap size in integration tests --- .../ElasticsearchRepositoriesAutoConfigurationTests.java | 2 +- ...ReactiveElasticsearchRepositoriesAutoConfigurationTests.java | 2 +- ...lasticsearchRestClientAutoConfigurationIntegrationTests.java | 2 +- ...lasticsearchRestClientAutoConfigurationIntegrationTests.java | 2 +- .../elasticsearch/DataElasticsearchTestIntegrationTests.java | 2 +- .../DataElasticsearchTestPropertiesIntegrationTests.java | 2 +- .../DataElasticsearchTestReactiveIntegrationTests.java | 2 +- .../DataElasticsearchTestWithIncludeFilterIntegrationTests.java | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchRepositoriesAutoConfigurationTests.java index a000f71b58..20da516ec7 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchRepositoriesAutoConfigurationTests.java @@ -50,7 +50,7 @@ class ElasticsearchRepositoriesAutoConfigurationTests { @Container static final ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch()) - .withEnv("ES_JAVA_OPTS", "-Xmx1g") + .withEnv("ES_JAVA_OPTS", "-Xms32m -Xmx512m") .withStartupAttempts(5) .withStartupTimeout(Duration.ofMinutes(10)); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRepositoriesAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRepositoriesAutoConfigurationTests.java index badda2975b..4bff531dff 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRepositoriesAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRepositoriesAutoConfigurationTests.java @@ -49,7 +49,7 @@ class ReactiveElasticsearchRepositoriesAutoConfigurationTests { @Container static ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch()) - .withEnv("ES_JAVA_OPTS", "-Xmx1g") + .withEnv("ES_JAVA_OPTS", "-Xms32m -Xmx512m") .withStartupAttempts(5) .withStartupTimeout(Duration.ofMinutes(10)); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRestClientAutoConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRestClientAutoConfigurationIntegrationTests.java index 005aa7786a..ed9b8b3a71 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRestClientAutoConfigurationIntegrationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/elasticsearch/ReactiveElasticsearchRestClientAutoConfigurationIntegrationTests.java @@ -45,7 +45,7 @@ class ReactiveElasticsearchRestClientAutoConfigurationIntegrationTests { @Container static ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch()) - .withEnv("ES_JAVA_OPTS", "-Xmx1g") + .withEnv("ES_JAVA_OPTS", "-Xms32m -Xmx512m") .withStartupAttempts(5) .withStartupTimeout(Duration.ofMinutes(10)); diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchRestClientAutoConfigurationIntegrationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchRestClientAutoConfigurationIntegrationTests.java index 591c9e6003..e133b8d9a9 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchRestClientAutoConfigurationIntegrationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/elasticsearch/ElasticsearchRestClientAutoConfigurationIntegrationTests.java @@ -53,7 +53,7 @@ class ElasticsearchRestClientAutoConfigurationIntegrationTests { @Container static final ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch()) - .withEnv("ES_JAVA_OPTS", "-Xmx1g") + .withEnv("ES_JAVA_OPTS", "-Xms32m -Xmx512m") .withStartupAttempts(5) .withStartupTimeout(Duration.ofMinutes(10)); diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/elasticsearch/DataElasticsearchTestIntegrationTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/elasticsearch/DataElasticsearchTestIntegrationTests.java index 71cf9e3f34..70b486b7ff 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/elasticsearch/DataElasticsearchTestIntegrationTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/elasticsearch/DataElasticsearchTestIntegrationTests.java @@ -46,7 +46,7 @@ class DataElasticsearchTestIntegrationTests { @Container static final ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch()) - .withEnv("ES_JAVA_OPTS", "-Xmx1g") + .withEnv("ES_JAVA_OPTS", "-Xms32m -Xmx512m") .withStartupAttempts(5) .withStartupTimeout(Duration.ofMinutes(10)); diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/elasticsearch/DataElasticsearchTestPropertiesIntegrationTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/elasticsearch/DataElasticsearchTestPropertiesIntegrationTests.java index 1dee6855cf..0020e88b0d 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/elasticsearch/DataElasticsearchTestPropertiesIntegrationTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/elasticsearch/DataElasticsearchTestPropertiesIntegrationTests.java @@ -44,7 +44,7 @@ class DataElasticsearchTestPropertiesIntegrationTests { @Container static final ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch()) - .withEnv("ES_JAVA_OPTS", "-Xmx1g") + .withEnv("ES_JAVA_OPTS", "-Xms32m -Xmx512m") .withStartupAttempts(5) .withStartupTimeout(Duration.ofMinutes(10)); diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/elasticsearch/DataElasticsearchTestReactiveIntegrationTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/elasticsearch/DataElasticsearchTestReactiveIntegrationTests.java index c5bfb1ad61..98b061a05f 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/elasticsearch/DataElasticsearchTestReactiveIntegrationTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/elasticsearch/DataElasticsearchTestReactiveIntegrationTests.java @@ -43,7 +43,7 @@ class DataElasticsearchTestReactiveIntegrationTests { @Container static final ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch()) - .withEnv("ES_JAVA_OPTS", "-Xmx1g") + .withEnv("ES_JAVA_OPTS", "-Xms32m -Xmx512m") .withStartupAttempts(5) .withStartupTimeout(Duration.ofMinutes(10)); diff --git a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/elasticsearch/DataElasticsearchTestWithIncludeFilterIntegrationTests.java b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/elasticsearch/DataElasticsearchTestWithIncludeFilterIntegrationTests.java index 7af03720a3..08636af638 100644 --- a/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/elasticsearch/DataElasticsearchTestWithIncludeFilterIntegrationTests.java +++ b/spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/data/elasticsearch/DataElasticsearchTestWithIncludeFilterIntegrationTests.java @@ -45,7 +45,7 @@ class DataElasticsearchTestWithIncludeFilterIntegrationTests { @Container static final ElasticsearchContainer elasticsearch = new ElasticsearchContainer(DockerImageNames.elasticsearch()) - .withEnv("ES_JAVA_OPTS", "-Xmx1g") + .withEnv("ES_JAVA_OPTS", "-Xms32m -Xmx512m") .withStartupAttempts(5) .withStartupTimeout(Duration.ofMinutes(10));