Fix health status aggregation bug
This commit is contained in:
@@ -45,8 +45,8 @@ public class HealthEndpointTests extends AbstractEndpointTests<HealthEndpoint> {
|
||||
|
||||
@Test
|
||||
public void invoke() throws Exception {
|
||||
Status result = new Status("FINE");
|
||||
assertThat(getEndpointBean().invoke().getStatus(), equalTo(result));
|
||||
// As FINE isn't configured in the order we get UNKOWN
|
||||
assertThat(getEndpointBean().invoke().getStatus(), equalTo(Status.UNKNOWN));
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
||||
@@ -69,8 +69,7 @@ public class OrderedHealthAggregatorTests {
|
||||
healths.put("h3", new Health.Builder().status(Status.UNKNOWN).build());
|
||||
healths.put("h4", new Health.Builder().status(Status.OUT_OF_SERVICE).build());
|
||||
healths.put("h5", new Health.Builder().status(new Status("CUSTOM")).build());
|
||||
assertEquals(new Status("CUSTOM"), this.healthAggregator.aggregate(healths)
|
||||
.getStatus());
|
||||
assertEquals(Status.DOWN, this.healthAggregator.aggregate(healths).getStatus());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user