use of org.springframework.boot.actuate.health.Health in project cas by apereo.
the class SessionHealthIndicatorTests method verifyObserveWarnSessionsExceeded.
@Test
public void verifyObserveWarnSessionsExceeded() {
addTicketsToRegistry(this.defaultRegistry, 10, 1);
final SessionMonitor monitor = new SessionMonitor(defaultRegistry, 0, 5);
final Health status = monitor.health();
assertEquals("WARN", status.getStatus().getCode());
}
use of org.springframework.boot.actuate.health.Health in project cas by apereo.
the class JdbcDataSourceHealthIndicatorTests method verifyObserve.
@Test
public void verifyObserve() {
final JdbcDataSourceHealthIndicator monitor = new JdbcDataSourceHealthIndicator(5000, this.dataSource, this.executor, "SELECT 1 FROM INFORMATION_SCHEMA.SYSTEM_USERS");
final Health status = monitor.health();
assertEquals(Status.UP, status.getStatus());
}
Aggregations