Java 类org.springframework.boot.actuate.health.ElasticsearchHealthIndicator 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:HealthIndicatorAutoConfigurationTests.java   
@Test
public void elasticsearchHealthIndicator() {
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.data.elasticsearch.properties.path.home:target",
            "management.health.diskspace.enabled:false");
    this.context.register(JestClientConfiguration.class,
            JestAutoConfiguration.class, ElasticsearchAutoConfiguration.class,
            ManagementServerProperties.class, HealthIndicatorAutoConfiguration.class);
    this.context.refresh();

    Map<String, HealthIndicator> beans = this.context
            .getBeansOfType(HealthIndicator.class);
    assertThat(beans).hasSize(1);
    assertThat(beans.values().iterator().next().getClass())
            .isEqualTo(ElasticsearchHealthIndicator.class);
}
项目:contestparser    文件:HealthIndicatorAutoConfigurationTests.java   
@Test
public void elasticSearchHealthIndicator() {
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.data.elasticsearch.properties.path.data:target/data",
            "spring.data.elasticsearch.properties.path.logs:target/logs",
            "management.health.diskspace.enabled:false");
    this.context.register(ElasticsearchAutoConfiguration.class,
            ManagementServerProperties.class, HealthIndicatorAutoConfiguration.class);
    this.context.refresh();

    Map<String, HealthIndicator> beans = this.context
            .getBeansOfType(HealthIndicator.class);
    assertEquals(1, beans.size());
    assertEquals(ElasticsearchHealthIndicator.class,
            beans.values().iterator().next().getClass());
}
项目:spring-boot-concourse    文件:HealthIndicatorAutoConfigurationTests.java   
@Test
public void elasticSearchHealthIndicator() {
    EnvironmentTestUtils.addEnvironment(this.context,
            "spring.data.elasticsearch.properties.path.home:target",
            "management.health.diskspace.enabled:false");
    this.context.register(ElasticsearchAutoConfiguration.class,
            ManagementServerProperties.class, HealthIndicatorAutoConfiguration.class);
    this.context.refresh();

    Map<String, HealthIndicator> beans = this.context
            .getBeansOfType(HealthIndicator.class);
    assertThat(beans).hasSize(1);
    assertThat(beans.values().iterator().next().getClass())
            .isEqualTo(ElasticsearchHealthIndicator.class);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:ElasticsearchHealthIndicatorConfiguration.java   
@Override
protected ElasticsearchHealthIndicator createHealthIndicator(Client client) {
    return new ElasticsearchHealthIndicator(client, this.properties);
}
项目:spring-boot-concourse    文件:HealthIndicatorAutoConfiguration.java   
@Override
protected ElasticsearchHealthIndicator createHealthIndicator(Client client) {
    return new ElasticsearchHealthIndicator(client, this.properties);
}
项目:contestparser    文件:HealthIndicatorAutoConfiguration.java   
@Override
protected ElasticsearchHealthIndicator createHealthIndicator(Client client) {
    return new ElasticsearchHealthIndicator(client, this.properties);
}