Limit elasticsearch memory usage
MODIFY
instrumentation/elasticsearch/elasticsearch-rest-5.0/javaagent/src/test/groovy/ElasticsearchRest5Test.groovy
instrumentation/elasticsearch/elasticsearch-rest-5.0/javaagent/src/test/groovy/ElasticsearchRest5Test.groovy
@@ -39,6 +39,8 @@ class ElasticsearchRest5Test extends AgentInstrumentationSpecification {
} else {
elasticsearch = new ElasticsearchContainer("docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.16")
}
+ // limit memory usage
+ elasticsearch.withEnv("ES_JAVA_OPTS", "-Xmx256m -Xms256m")
elasticsearch.start()
httpHost = HttpHost.create(elasticsearch.getHttpHostAddress())

MODIFY
instrumentation/elasticsearch/elasticsearch-rest-6.4/javaagent/src/test/groovy/ElasticsearchRest6Test.groovy
instrumentation/elasticsearch/elasticsearch-rest-6.4/javaagent/src/test/groovy/ElasticsearchRest6Test.groovy
@@ -33,6 +33,8 @@ class ElasticsearchRest6Test extends AgentInstrumentationSpecification {
def setupSpec() {
elasticsearch = new ElasticsearchContainer("docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.16")
+ // limit memory usage
+ elasticsearch.withEnv("ES_JAVA_OPTS", "-Xmx256m -Xms256m")
elasticsearch.start()
httpHost = HttpHost.create(elasticsearch.getHttpHostAddress())

MODIFY
instrumentation/elasticsearch/elasticsearch-rest-7.0/javaagent/src/test/groovy/ElasticsearchRest7Test.groovy
instrumentation/elasticsearch/elasticsearch-rest-7.0/javaagent/src/test/groovy/ElasticsearchRest7Test.groovy
@@ -34,6 +34,8 @@ class ElasticsearchRest7Test extends AgentInstrumentationSpecification {
def setupSpec() {
elasticsearch = new ElasticsearchContainer("docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2")
+ // limit memory usage
+ elasticsearch.withEnv("ES_JAVA_OPTS", "-Xmx256m -Xms256m")
elasticsearch.start()
httpHost = HttpHost.create(elasticsearch.getHttpHostAddress())

Limit elasticsearch memory usage (#4892)