Browse Source

Merge pull request #18612 from contextshuffling

* pr/18612:
  Use LinkedHashSet for deterministic order in test assertion

Closes gh-18612
pull/18566/head
Stephane Nicoll 6 years ago
parent
commit
4eaa3873dd
  1. 3
      spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/CompositeHealthIndicatorTests.java

3
spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/health/CompositeHealthIndicatorTests.java

@ -18,6 +18,7 @@ package org.springframework.boot.actuate.health; @@ -18,6 +18,7 @@ package org.springframework.boot.actuate.health;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import com.fasterxml.jackson.databind.ObjectMapper;
@ -71,7 +72,7 @@ public class CompositeHealthIndicatorTests { @@ -71,7 +72,7 @@ public class CompositeHealthIndicatorTests {
@Test
public void testSerialization() throws Exception {
Map<String, HealthIndicator> indicators = new HashMap<>();
Map<String, HealthIndicator> indicators = new LinkedHashMap<>();
indicators.put("db1", this.one);
indicators.put("db2", this.two);
CompositeHealthIndicator innerComposite = new CompositeHealthIndicator(this.healthAggregator, indicators);

Loading…
Cancel
Save