use of org.neo4j.kernel.monitoring.DatabasePanicEventGenerator in project neo4j by neo4j.
the class DatabaseHealthTest method shouldGenerateDatabasePanicEvents.
@Test
void shouldGenerateDatabasePanicEvents() {
// GIVEN
DatabasePanicEventGenerator generator = mock(DatabasePanicEventGenerator.class);
Health databaseHealth = new DatabaseHealth(generator, NullLogProvider.getInstance().getLog(DatabaseHealth.class));
databaseHealth.healed();
// WHEN
Exception cause = new Exception("My own fault");
databaseHealth.panic(cause);
databaseHealth.panic(cause);
// THEN
verify(generator).panic(cause);
}
Aggregations