use of org.neo4j.kernel.impl.util.watcher.FileWatcherLifecycleAdapter in project neo4j by neo4j.
the class FileWatcherLifecycleAdapterTest method startMonitoringWhenLifecycleStarting.
@Test
public void startMonitoringWhenLifecycleStarting() throws Throwable {
CountDownLatch latch = new CountDownLatch(1);
FileWatcher watcher = new TestFileWatcher(latch);
FileWatcherLifecycleAdapter watcherAdapter = new FileWatcherLifecycleAdapter(jobScheduler, watcher);
watcherAdapter.init();
watcherAdapter.start();
latch.await();
}
use of org.neo4j.kernel.impl.util.watcher.FileWatcherLifecycleAdapter in project neo4j by neo4j.
the class FileWatcherLifecycleAdapterTest method stopMonitoringWhenLifecycleStops.
@Test
public void stopMonitoringWhenLifecycleStops() throws Throwable {
FileWatcherLifecycleAdapter watcherAdapter = new FileWatcherLifecycleAdapter(jobScheduler, fileWatcher);
watcherAdapter.init();
watcherAdapter.start();
watcherAdapter.stop();
verify(fileWatcher).stopWatching();
}
use of org.neo4j.kernel.impl.util.watcher.FileWatcherLifecycleAdapter in project neo4j by neo4j.
the class FileWatcherLifecycleAdapterTest method closeFileWatcherOnShutdown.
@Test
public void closeFileWatcherOnShutdown() throws Throwable {
FileWatcherLifecycleAdapter watcherAdapter = new FileWatcherLifecycleAdapter(jobScheduler, fileWatcher);
watcherAdapter.init();
watcherAdapter.start();
watcherAdapter.stop();
watcherAdapter.shutdown();
verify(fileWatcher).close();
}
Aggregations