diff --git a/integration-tests/main-app-test/src/test/java/co/elastic/apm/test/AgentSetupIT.java b/integration-tests/main-app-test/src/test/java/co/elastic/apm/test/AgentSetupIT.java
index fac320dffe..32e6c05903 100644
--- a/integration-tests/main-app-test/src/test/java/co/elastic/apm/test/AgentSetupIT.java
+++ b/integration-tests/main-app-test/src/test/java/co/elastic/apm/test/AgentSetupIT.java
@@ -66,9 +66,11 @@ void testSecurityManagerWarning() {
try (AgentTestContainer.JarApp app = testAppWithJavaAgent("openjdk:17", AgentFileAccessor.Variant.STANDARD)) {
app.withSecurityManager(null)
- .waitingFor(Wait.forLogMessage(expectedMsg, 1))
+ // using a dummy command since testcontainers 1.21.0 as waiting on stderr msg is not working anymore
+ // when the container fails to start. Likely related to https://github.com/testcontainers/testcontainers-java/issues/9956
+ .waitingFor(Wait.forLogMessage(".*processing of -javaagent failed, processJavaStart failed.*", 1))
// we expect startup to fail fast as JVM should not even properly start
- .withStartupTimeout(Duration.ofSeconds(1));
+ .withStartupTimeout(Duration.ofSeconds(3));
app.start();
@@ -83,7 +85,7 @@ void testSecurityManagerWithPolicy(@TempDir Path temp) throws IOException {
// use a 'grant all' policy for now
Files.write(tempPolicy, Arrays.asList(
- "grant codeBase \"file:///tmp/elastic-apm-agent.jar\" {",
+ "grant codeBase \"file:///agent.jar\" {",
" permission java.security.AllPermission;",
"};"), StandardOpenOption.CREATE
);
diff --git a/pom.xml b/pom.xml
index 394dfe67a7..569b22c4c2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -139,7 +139,7 @@
1.17
- 1.20.3
+ 1.21.0
2.38.0