use of org.neo4j.kernel.impl.util.watcher.FileSystemWatcherService in project neo4j by neo4j.
the class LocalDatabaseTest method doNotRestartServicesIfAlreadyStarted.
@Test
public void doNotRestartServicesIfAlreadyStarted() throws Throwable {
DataSourceManager dataSourceManager = mock(DataSourceManager.class);
FileSystemWatcherService watcherService = mock(FileSystemWatcherService.class);
LocalDatabase localDatabase = newLocalDatabase(newAvailabilityGuard(), dataSourceManager, watcherService);
localDatabase.start();
verify(dataSourceManager).start();
verify(watcherService).start();
reset(dataSourceManager);
reset(watcherService);
localDatabase.start();
localDatabase.start();
verify(dataSourceManager, times(0)).start();
verify(watcherService, times(0)).start();
}
Aggregations