Skip to content

Commit 493165d

Browse files
committed
Fix indexingRescanOnOverflow test
1 parent 924492d commit 493165d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/test/java/engineering/swat/watch/SingleDirectoryTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,13 +206,15 @@ void indexingRescanOnOverflow() throws IOException, InterruptedException {
206206
});
207207

208208
try (var watch = watchConfig.start()) {
209+
Thread.sleep(TestHelper.NORMAL_WAIT.toMillis());
209210
// At this point, the index of last-modified-times inside `watch` is
210211
// populated with initial values.
211212

212213
Files.writeString(directory.resolve("a.txt"), "foo");
213214
Files.writeString(directory.resolve("b.txt"), "bar");
214215
Files.delete(directory.resolve("c.txt"));
215216
Files.createFile(directory.resolve("d.txt"));
217+
Thread.sleep(TestHelper.NORMAL_WAIT.toMillis());
216218
// At this point, regular events have been generated for a.txt,
217219
// b.txt, c.txt, and d.txt by the file system. These events won't be
218220
// handled by `watch` just yet, though, because the semaphore is

0 commit comments

Comments
 (0)