Merge pull request #15136 from restolho
* pr/15136: Change DataSourceHealthIndicator details from "hello" to "result"
This commit is contained in:
@@ -114,7 +114,7 @@ public class DataSourceHealthIndicator extends AbstractHealthIndicator
|
||||
List<Object> results = this.jdbcTemplate.query(validationQuery,
|
||||
new SingleColumnRowMapper());
|
||||
Object result = DataAccessUtils.requiredSingleResult(results);
|
||||
builder.withDetail("hello", result);
|
||||
builder.withDetail("result", result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ public class DataSourceHealthIndicatorTests {
|
||||
this.indicator.setDataSource(this.dataSource);
|
||||
Health health = this.indicator.health();
|
||||
assertThat(health.getDetails().get("database")).isNotNull();
|
||||
assertThat(health.getDetails().get("hello")).isNotNull();
|
||||
assertThat(health.getDetails().get("result")).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -80,7 +80,7 @@ public class DataSourceHealthIndicatorTests {
|
||||
System.err.println(health);
|
||||
assertThat(health.getDetails().get("database")).isNotNull();
|
||||
assertThat(health.getStatus()).isEqualTo(Status.UP);
|
||||
assertThat(health.getDetails().get("hello")).isNotNull();
|
||||
assertThat(health.getDetails().get("result")).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user