use of org.neo4j.internal.batchimport.DataStatistics in project neo4j by neo4j.
the class HumanUnderstandableExecutionMonitorIT method shouldStartFromNonFirstStage.
@Test
void shouldStartFromNonFirstStage() {
// given
HumanUnderstandableExecutionMonitor monitor = new HumanUnderstandableExecutionMonitor(HumanUnderstandableExecutionMonitor.NO_MONITOR);
Dependencies dependencies = new Dependencies();
dependencies.satisfyDependency(Input.knownEstimates(10, 10, 10, 10, 10, 10, 10));
BatchingNeoStores neoStores = mock(BatchingNeoStores.class);
NodeStore nodeStore = mock(NodeStore.class);
RelationshipStore relationshipStore = mock(RelationshipStore.class);
when(neoStores.getNodeStore()).thenReturn(nodeStore);
when(neoStores.getRelationshipStore()).thenReturn(relationshipStore);
dependencies.satisfyDependency(neoStores);
dependencies.satisfyDependency(IdMappers.actual());
dependencies.satisfyDependency(mock(PageCacheArrayFactoryMonitor.class));
dependencies.satisfyDependency(new DataStatistics(10, 10, new DataStatistics.RelationshipTypeCount[0]));
monitor.initialize(dependencies);
// when/then
StageExecution execution = mock(StageExecution.class);
when(execution.getStageName()).thenReturn(NodeDegreeCountStage.NAME);
assertThatCode(() -> monitor.start(execution)).doesNotThrowAnyException();
}
Aggregations