diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/metadata/MetaDataTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/metadata/MetaDataTest.java index 25c2c9e9f01..4e21d04acc3 100644 --- a/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/metadata/MetaDataTest.java +++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/impl/metadata/MetaDataTest.java @@ -157,8 +157,9 @@ void testTimeoutConfiguration() throws InterruptedException, ExecutionException, timeoutException = e; } assertThat(timeoutException).isInstanceOf(TimeoutException.class); - // Should not time out - metaDataFuture.get(500, TimeUnit.MILLISECONDS); + // Metadata discovery uses independent per-operation timeouts and may + // perform sequential fallbacks, especially for hostname discovery on Windows. + metaDataFuture.get(2000, TimeUnit.MILLISECONDS); } @Test