pull/26435/head
Scott Frederick 4 years ago committed by Phillip Webb
parent fe696ee22a
commit 922517c0e5

@ -458,7 +458,7 @@ class ConfigDataEnvironmentContributor implements Iterable<ConfigDataEnvironment
BOUND_IMPORT,
/**
* A valid location that contained noething to load.
* A valid location that contained nothing to load.
*/
EMPTY_LOCATION;

@ -27,8 +27,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;
import org.apache.logging.log4j.util.Strings;
import org.assertj.core.api.Condition;
@ -407,9 +405,7 @@ class ConfigDataEnvironmentPostProcessorIntegrationTests {
String property = context.getEnvironment().getProperty("my.property");
assertThat(context.getEnvironment().getActiveProfiles()).contains("dev");
assertThat(property).isEqualTo("fromdevprofile");
List<String> names = StreamSupport.stream(context.getEnvironment().getPropertySources().spliterator(), false)
.map(org.springframework.core.env.PropertySource::getName).collect(Collectors.toList());
assertThat(names).contains(
assertThat(context.getEnvironment().getPropertySources()).extracting("name").contains(
"Config resource 'class path resource [configdata/profiles/testsetprofiles.yml]' via location 'classpath:configdata/profiles/' (document #0)",
"Config resource 'class path resource [configdata/profiles/testsetprofiles.yml]' via location 'classpath:configdata/profiles/' (document #1)");
}

Loading…
Cancel
Save