Set smoke tests xmx to 512m and backend to 128m (#5772)

This commit is contained in:
Lauri Tulmin 2022-04-08 01:09:26 +03:00 committed by GitHub
parent 31f5734be6
commit 91e9539ac1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 1 deletions

View File

@ -22,7 +22,7 @@ public abstract class AbstractTestContainerManager implements TestContainerManag
// 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(jvmArgsEnvVarName, "-Xmx512m -javaagent:/" + TARGET_AGENT_FILENAME);
environment.put("OTEL_BSP_MAX_EXPORT_BATCH_SIZE", "1");
environment.put("OTEL_BSP_SCHEDULE_DELAY", "10ms");
environment.put("OTEL_METRIC_EXPORT_INTERVAL", "1000");

View File

@ -88,6 +88,7 @@ public class LinuxTestContainerManager extends AbstractTestContainerManager {
new GenericContainer<>(DockerImageName.parse(targetImageName))
.withStartupTimeout(Duration.ofMinutes(5))
.withExposedPorts(ports.toArray(new Integer[0]))
.withEnv("JAVA_TOOL_OPTIONS", "-Xmx128m")
.withNetwork(network)
.withLogConsumer(output)
.withLogConsumer(new Slf4jLogConsumer(appLogger))

View File

@ -89,6 +89,7 @@ public class WindowsTestContainerManager extends AbstractTestContainerManager {
command
.withAliases(BACKEND_ALIAS)
.withExposedPorts(ExposedPort.tcp(BACKEND_PORT))
.withEnv("JAVA_TOOL_OPTIONS=-Xmx128m")
.withHostConfig(
HostConfig.newHostConfig()
.withAutoRemove(true)