From 72bc12d4f8747bd82e6033578d571c40471c6f73 Mon Sep 17 00:00:00 2001 From: Marc Nuri Date: Mon, 9 Dec 2024 19:28:25 +0100 Subject: [PATCH] test: fix flaky test in MacOS Signed-off-by: Marc Nuri --- .../jkube/kit/build/service/docker/WatchServiceTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jkube-kit/build/service/docker/src/test/java/org/eclipse/jkube/kit/build/service/docker/WatchServiceTest.java b/jkube-kit/build/service/docker/src/test/java/org/eclipse/jkube/kit/build/service/docker/WatchServiceTest.java index 46aee204b6..7563584597 100644 --- a/jkube-kit/build/service/docker/src/test/java/org/eclipse/jkube/kit/build/service/docker/WatchServiceTest.java +++ b/jkube-kit/build/service/docker/src/test/java/org/eclipse/jkube/kit/build/service/docker/WatchServiceTest.java @@ -61,7 +61,7 @@ class WatchServiceTest { void setUp(@TempDir Path tempDir) throws IOException { watchedFile = Files.createFile(tempDir.resolve("file.txt")).toFile(); executorService = Executors.newScheduledThreadPool(2); - executorService.scheduleAtFixedRate(this::changeFile, 0, 10, TimeUnit.MILLISECONDS); + executorService.scheduleAtFixedRate(this::changeFile, 0, 100, TimeUnit.MILLISECONDS); final KitLogger logger = new KitLogger.SilentLogger(); buildService = mock(BuildService.class); watchService = new WatchService( @@ -141,7 +141,7 @@ void buildsImage() throws IOException { return null; }); // Then - verify(buildService, timeout(5000)) + verify(buildService, timeout(5000).atLeastOnce()) .buildImage(imageConfiguration, null, watchContext.getBuildContext()); }