Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions smoke-tests/src/test/java/com/solarwinds/LambdaTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import com.solarwinds.containers.PetClinicRestContainer;
import com.solarwinds.containers.PostgresContainer;
import com.solarwinds.containers.SpringBootWebMvcContainer;
import com.solarwinds.containers.SquidContainer;
import com.solarwinds.results.ResultsCollector;
import com.solarwinds.util.LogStreamAnalyzer;
import com.solarwinds.util.NamingConventions;
Expand Down Expand Up @@ -76,9 +75,6 @@ static void runTestConfig() {
}

static void runAppOnce(Agent agent) throws Exception {
GenericContainer<?> squid = new SquidContainer(NETWORK).build();
squid.start();

GenericContainer<?> postgres = new PostgresContainer(NETWORK).build();
postgres.start();

Expand All @@ -91,10 +87,9 @@ static void runAppOnce(Agent agent) throws Exception {

GenericContainer<?> k6 = new K6Container(NETWORK, agent, namingConventions).build();
k6.start();
petClinic.execInContainer("kill", "1");

petClinic.execInContainer("kill", "1");
webMvc.execInContainer("kill", "1");
squid.execInContainer("kill", "1");
postgres.stop();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public GenericContainer<?> build() {
.withCopyFileToContainer(
MountableFile.forHostPath(agentPath),
"/app/" + agentPath.getFileName())
.withCommand(buildCommandline(agentPath));
.withCommand(buildCommandlineLambda(agentPath));
}

if (Objects.equals(System.getenv("SMOKEV2"), "true")){
Expand Down Expand Up @@ -167,4 +167,18 @@ private String[] buildCommandline(Path agentJarPath) {
result.add("/app/spring-petclinic-rest.jar");
return result.toArray(new String[] {});
}

@NotNull
private String[] buildCommandlineLambda(Path agentJarPath) {
List<String> result = new ArrayList<>();
result.add("java");

result.addAll(this.agent.getAdditionalJvmArgs());
result.add("-javaagent:/app/" + agentJarPath.getFileName());
result.add("-Dotel.metric.export.interval=100ms");

result.add("-jar");
result.add("/app/spring-petclinic-rest.jar");
return result.toArray(new String[] {});
}
}
Loading