Skip to content

Commit 302a6e8

Browse files
committed
Merge branch '3.4.x'
Closes gh-45962
2 parents 0dae049 + 3911507 commit 302a6e8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/context/properties/ConfigurationPropertiesTests.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,12 @@ void loadWhenBindingTwoBeansShouldBind() {
302302
@Test
303303
void loadWhenBindingWithParentContextShouldBind() {
304304
AnnotationConfigApplicationContext parent = load(BasicConfiguration.class, "name=parent");
305+
assertThat(parent.getEnvironment().getProperty("name")).isEqualTo("parent");
305306
this.context = new AnnotationConfigApplicationContext();
306307
this.context.setParent(parent);
308+
removeSystemProperties();
307309
load(new Class<?>[] { BasicConfiguration.class, BasicPropertiesConsumer.class }, "name=child");
310+
assertThat(this.context.getEnvironment().getProperty("name")).isEqualTo("child");
308311
assertThat(this.context.getBean(BasicProperties.class)).isNotNull();
309312
assertThat(parent.getBean(BasicProperties.class)).isNotNull();
310313
assertThat(this.context.getBean(BasicPropertiesConsumer.class).getName()).isEqualTo("child");

0 commit comments

Comments
 (0)