Fix sporadically failing smoke test
* Fix failing smoke test
* Revert "Fix failing smoke test"
This reverts commit
* Apply Xmx
@@ -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");
