use of org.neo4j.kernel.impl.transaction.state.DataSourceManager in project neo4j by neo4j.
the class DefaultUdcInformationCollectorTest method shouldReportStoreSizes.
@Test
public void shouldReportStoreSizes() throws Throwable {
DataSourceManager dataSourceManager = new DataSourceManager();
NeoStoreDataSource dataSource = mock(NeoStoreDataSource.class);
dataSourceManager.start();
UdcInformationCollector collector = new DefaultUdcInformationCollector(Config.empty(), dataSourceManager, new StubIdGeneratorFactory(), mock(StartupStatistics.class), usageData);
when(dataSource.getStoreId()).thenReturn(StoreId.DEFAULT);
dataSourceManager.register(dataSource);
when(dataSource.listStoreFiles(false)).thenReturn(asResourceIterator(testFiles().iterator()));
Map<String, String> udcParams = collector.getUdcParams();
assertThat(udcParams.get("storesize"), is("152"));
}
Aggregations