Fix sporadically failing smoke test (#3895)

* Fix failing smoke test

* Revert "Fix failing smoke test"

This reverts commit 0356ae308b.

* Apply Xmx
This commit is contained in:
Trask Stalnaker 2021-08-22 19:27:16 -07:00 committed by GitHub
parent 6ceeacd381
commit fa71cf9c8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -21,7 +21,10 @@ public abstract class AbstractTestContainerManager implements TestContainerManag
protected Map<String, String> getAgentEnvironment(String jvmArgsEnvVarName) {
Map<String, String> environment = new HashMap<>();
environment.put(jvmArgsEnvVarName, "-javaagent:/" + TARGET_AGENT_FILENAME);
// while modern JVMs understand linux container memory limits, they do not understand windows
// container memory limits yet, so we need to explicitly set max heap in order to prevent the
// JVM from taking too much memory and hitting the windows container memory limit
environment.put(jvmArgsEnvVarName, "-Xmx1g -javaagent:/" + TARGET_AGENT_FILENAME);
environment.put("OTEL_BSP_MAX_EXPORT_BATCH_SIZE", "1");
environment.put("OTEL_BSP_SCHEDULE_DELAY", "10ms");
environment.put("OTEL_IMR_EXPORT_INTERVAL", "1000");