Change DataSourceHealthIndicator details from "hello" to "result"
Closes gh-15136
This commit is contained in:
committed by
Stephane Nicoll
parent
84ace92a27
commit
d9586d94f6
@@ -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