Skip to content

Commit

Permalink
test: fix flaky test in MacOS
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Nuri <marc@marcnuri.com>
  • Loading branch information
manusa authored Dec 9, 2024
1 parent bf54966 commit 72bc12d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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());
}

Expand Down

0 comments on commit 72bc12d

Please sign in to comment.