From 5386e8127ce3f8bcb0c221cd9f848e292d8d3306 Mon Sep 17 00:00:00 2001 From: Eyal Koren <41850454+eyalkoren@users.noreply.github.com> Date: Tue, 8 Feb 2022 14:34:46 +0200 Subject: [PATCH] Handling flaky test - CompletableFutureTest#testCancelBeforeStart --- .../java/co/elastic/apm/agent/util/CompletableFutureTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apm-agent-core/src/test/java/co/elastic/apm/agent/util/CompletableFutureTest.java b/apm-agent-core/src/test/java/co/elastic/apm/agent/util/CompletableFutureTest.java index a06d6c32f8..39de0f0905 100644 --- a/apm-agent-core/src/test/java/co/elastic/apm/agent/util/CompletableFutureTest.java +++ b/apm-agent-core/src/test/java/co/elastic/apm/agent/util/CompletableFutureTest.java @@ -69,7 +69,7 @@ void reset() { void testCancelBeforeStart() { final CompletableFuture completableFuture = new CompletableFuture<>(); for (int i = 0; i < NUM_THREADS; i++) { - scheduledExecutorService.schedule(new CompletableFutureTester(completableFuture, 5), 200, TimeUnit.MILLISECONDS); + scheduledExecutorService.schedule(new CompletableFutureTester(completableFuture, 5), 300, TimeUnit.MILLISECONDS); } assertThat(completableFuture.cancel(false)).isTrue(); assertThat(completableFuture.cancel(false)).isFalse();