From bda22da938d48623f1c485d90f4e2acaaa176569 Mon Sep 17 00:00:00 2001 From: Jaroslav Bachorik Date: Wed, 14 Oct 2026 16:34:45 +0200 Subject: [PATCH] test: Relax TempLocationManagerTest concurrent cleanup deadline to 60s The short deadline assumes unloaded CI machines; on busy runners the concurrent cleanup assertions time out. 60s keeps the test meaningful while removing the flakiness. --- .../datadog/trace/util/TempLocationManagerTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal-api/src/test/java/datadog/trace/util/TempLocationManagerTest.java b/internal-api/src/test/java/datadog/trace/util/TempLocationManagerTest.java index af22b5fe804..a0ee4c65fcc 100644 --- a/internal-api/src/test/java/datadog/trace/util/TempLocationManagerTest.java +++ b/internal-api/src/test/java/datadog/trace/util/TempLocationManagerTest.java @@ -159,9 +159,9 @@ private void syncPoint(boolean timeout) { withTimeout.compareAndSet(false, timeout); hookReached.countDown(); try { - if (!proceedSignal.await(30, TimeUnit.SECONDS)) { + if (!proceedSignal.await(60, TimeUnit.SECONDS)) { cleanupError.set( - new AssertionError("Cleanup thread: proceed signal timeout after 30s")); + new AssertionError("Cleanup thread: proceed signal timeout after 60s")); } } catch (InterruptedException e) { Thread.currentThread().interrupt(); @@ -207,13 +207,13 @@ public FileVisitResult postVisitDirectory(Path dir, IOException exc, boolean tim try { assertTrue( - hookReached.await(30, TimeUnit.SECONDS), - "Cleanup thread should reach hook within 30 seconds"); + hookReached.await(60, TimeUnit.SECONDS), + "Cleanup thread should reach hook within 60 seconds"); // The visitor may have already deleted the file by this point; tolerate. Files.deleteIfExists(fakeTempFile); proceedSignal.countDown(); - cleanupThread.join(TimeUnit.SECONDS.toMillis(30)); - assertFalse(cleanupThread.isAlive(), "Cleanup should complete within 30s"); + cleanupThread.join(TimeUnit.SECONDS.toMillis(60)); + assertFalse(cleanupThread.isAlive(), "Cleanup should complete within 60s"); Throwable error = cleanupError.get(); if (error != null) {