Tweak FileSystemWatcherTests timing for Windows

This commit is contained in:
Phillip Webb
2016-04-10 23:28:37 -07:00
parent 35bec96180
commit 8514064d5c

View File

@@ -154,10 +154,10 @@ public class FileSystemWatcherTests {
@Test
public void waitsForPollingInterval() throws Exception {
this.changes.clear();
setupWatcher(100, 1);
setupWatcher(200, 1);
File folder = startWithNewFolder();
touch(new File(folder, "test1.txt"));
Thread.sleep(200);
Thread.sleep(400);
touch(new File(folder, "test2.txt"));
this.watcher.stopAfter(1);
assertThat(this.changes.size()).isEqualTo(2);