Skip to content

Commit fa71cf9

Browse files
authored
Fix sporadically failing smoke test (#3895)
* Fix failing smoke test * Revert "Fix failing smoke test" This reverts commit 0356ae3. * Apply Xmx
1 parent 6ceeacd commit fa71cf9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

smoke-tests/src/test/java/io/opentelemetry/smoketest/AbstractTestContainerManager.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ public abstract class AbstractTestContainerManager implements TestContainerManag
2121

2222
protected Map<String, String> getAgentEnvironment(String jvmArgsEnvVarName) {
2323
Map<String, String> environment = new HashMap<>();
24-
environment.put(jvmArgsEnvVarName, "-javaagent:/" + TARGET_AGENT_FILENAME);
24+
// while modern JVMs understand linux container memory limits, they do not understand windows
25+
// container memory limits yet, so we need to explicitly set max heap in order to prevent the
26+
// JVM from taking too much memory and hitting the windows container memory limit
27+
environment.put(jvmArgsEnvVarName, "-Xmx1g -javaagent:/" + TARGET_AGENT_FILENAME);
2528
environment.put("OTEL_BSP_MAX_EXPORT_BATCH_SIZE", "1");
2629
environment.put("OTEL_BSP_SCHEDULE_DELAY", "10ms");
2730
environment.put("OTEL_IMR_EXPORT_INTERVAL", "1000");

0 commit comments

Comments
 (0)