Commit a8c65401 authored by contextshuffling's avatar contextshuffling Committed by Stephane Nicoll

Use LinkedHashSet for deterministic order in test assertion

See gh-18612
parent 00d4b44c
...@@ -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.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
...@@ -71,7 +72,7 @@ public class CompositeHealthIndicatorTests { ...@@ -71,7 +72,7 @@ public class CompositeHealthIndicatorTests {
@Test @Test
public void testSerialization() throws Exception { public void testSerialization() throws Exception {
Map<String, HealthIndicator> indicators = new HashMap<>(); Map<String, HealthIndicator> indicators = new LinkedHashMap<>();
indicators.put("db1", this.one); indicators.put("db1", this.one);
indicators.put("db2", this.two); indicators.put("db2", this.two);
CompositeHealthIndicator innerComposite = new CompositeHealthIndicator(this.healthAggregator, indicators); CompositeHealthIndicator innerComposite = new CompositeHealthIndicator(this.healthAggregator, indicators);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment