Fix sporadically failing smoke test
* Fix failing smoke test
* Revert "Fix failing smoke test"
This reverts commit
* Apply Xmx
MODIFY
smoke-tests/src/test/java/io/opentelemetry/smoketest/AbstractTestContainerManager.java
smoke-tests/src/test/java/io/opentelemetry/smoketest/AbstractTestContainerManager.java
@@ -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");

Fix sporadically failing smoke test (#3895)

* Fix failing smoke test

* Revert "Fix failing smoke test"

This reverts commit 0356ae308b11d9a5c154e18a808f0089f63355b1.

* Apply Xmx