use of com.ecwid.consul.v1.health.model.Check in project spring-cloud-consul by spring-cloud.
the class TtlSchedulerTests method should_send_a_check_before_ttl_for_all_services.
@Test
public void should_send_a_check_before_ttl_for_all_services() throws InterruptedException {
// Wait for TTL to expired (TTL is set to 2 seconds)
Thread.sleep(2100);
Check serviceCheck = getCheckForService("ttlScheduler");
assertThat(serviceCheck).isNotNull();
assertThat(serviceCheck.getStatus()).isEqualTo(PASSING).as("Service check is in wrong state");
Check serviceManagementCheck = getCheckForService("ttlScheduler-management");
assertThat(serviceManagementCheck).isNotNull();
assertThat(serviceManagementCheck.getStatus()).isEqualTo(PASSING).as("Service management check is in wrong state");
}
Aggregations