Closes gh-3346
pull/3346/merge
izeye 10 years ago committed by Stephane Nicoll
parent 46fbca66a6
commit df33830fb6

@ -136,7 +136,7 @@ public class FileSystemWatcherTests {
} }
@Test @Test
public void waitsForIdleTime() throws Exception { public void waitsForPollingInterval() throws Exception {
this.changes.clear(); this.changes.clear();
setupWatcher(100, 1); setupWatcher(100, 1);
File folder = startWithNewFolder(); File folder = startWithNewFolder();
@ -148,7 +148,7 @@ public class FileSystemWatcherTests {
} }
@Test @Test
public void waitsForQuietTime() throws Exception { public void waitsForQuietPeriod() throws Exception {
setupWatcher(300, 200); setupWatcher(300, 200);
File folder = startWithNewFolder(); File folder = startWithNewFolder();
for (int i = 0; i < 10; i++) { for (int i = 0; i < 10; i++) {
@ -266,8 +266,8 @@ public class FileSystemWatcherTests {
assertEquals(expected, actual); assertEquals(expected, actual);
} }
private void setupWatcher(long idleTime, long quietTime) { private void setupWatcher(long pollingInterval, long quietPeriod) {
this.watcher = new FileSystemWatcher(false, idleTime, quietTime); this.watcher = new FileSystemWatcher(false, pollingInterval, quietPeriod);
this.watcher.addListener(new FileChangeListener() { this.watcher.addListener(new FileChangeListener() {
@Override @Override
public void onChange(Set<ChangedFiles> changeSet) { public void onChange(Set<ChangedFiles> changeSet) {

Loading…
Cancel
Save