diff --git a/spring-cloud-context/src/test/java/org/springframework/cloud/context/properties/ConfigurationPropertiesRebinderListIntegrationTests.java b/spring-cloud-context/src/test/java/org/springframework/cloud/context/properties/ConfigurationPropertiesRebinderListIntegrationTests.java index b786728a..0a6ed3e3 100644 --- a/spring-cloud-context/src/test/java/org/springframework/cloud/context/properties/ConfigurationPropertiesRebinderListIntegrationTests.java +++ b/spring-cloud-context/src/test/java/org/springframework/cloud/context/properties/ConfigurationPropertiesRebinderListIntegrationTests.java @@ -56,23 +56,24 @@ public class ConfigurationPropertiesRebinderListIntegrationTests { @Test @DirtiesContext - public void testAppendProperties() throws Exception { - then("[one, two]").isEqualTo(this.properties.getMessages().toString()); + @Disabled("caused by https://github.com/spring-projects/spring-boot/issues/28776") + public void testAppendProperties() { + then(this.properties.getMessages()).containsOnly("one", "two"); TestPropertyValues.of("messages[0]:foo").applyTo(this.environment); this.rebinder.rebind(); - then(this.properties.getMessages().toString()).isEqualTo("[foo]"); + then(this.properties.getMessages()).containsOnly("foo"); } @Test @DirtiesContext @Disabled("Can't rebind to list and re-initialize it (need refresh scope for this to work)") - public void testReplaceProperties() throws Exception { - then("[one, two]").isEqualTo(this.properties.getMessages().toString()); + public void testReplaceProperties() { + then(this.properties.getMessages()).containsOnly("one", "two"); Map map = findTestProperties(); map.clear(); TestPropertyValues.of("messages[0]:foo").applyTo(this.environment); this.rebinder.rebind(); - then(this.properties.getMessages().toString()).isEqualTo("[foo]"); + then(this.properties.getMessages()).containsOnly("foo"); } private Map findTestProperties() { @@ -88,13 +89,13 @@ public class ConfigurationPropertiesRebinderListIntegrationTests { @Test @DirtiesContext - public void testReplacePropertiesWithCommaSeparated() throws Exception { - then("[one, two]").isEqualTo(this.properties.getMessages().toString()); + public void testReplacePropertiesWithCommaSeparated() { + then(this.properties.getMessages()).containsOnly("one", "two"); Map map = findTestProperties(); map.clear(); TestPropertyValues.of("messages:foo").applyTo(this.environment); this.rebinder.rebind(); - then(this.properties.getMessages().toString()).isEqualTo("[foo]"); + then(this.properties.getMessages()).containsOnly("foo"); } @Configuration(proxyBeanMethods = false) @@ -103,7 +104,7 @@ public class ConfigurationPropertiesRebinderListIntegrationTests { protected static class TestConfiguration { @Bean - protected TestProperties properties() { + protected TestProperties localTestProperties() { return new TestProperties(); } diff --git a/spring-cloud-context/src/test/java/org/springframework/cloud/context/properties/ConfigurationPropertiesRebinderProxyIntegrationTests.java b/spring-cloud-context/src/test/java/org/springframework/cloud/context/properties/ConfigurationPropertiesRebinderProxyIntegrationTests.java index b4322033..24cdf91a 100644 --- a/spring-cloud-context/src/test/java/org/springframework/cloud/context/properties/ConfigurationPropertiesRebinderProxyIntegrationTests.java +++ b/spring-cloud-context/src/test/java/org/springframework/cloud/context/properties/ConfigurationPropertiesRebinderProxyIntegrationTests.java @@ -21,6 +21,7 @@ import java.util.Map; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -55,6 +56,7 @@ public class ConfigurationPropertiesRebinderProxyIntegrationTests { @Test @DirtiesContext + @Disabled("caused by https://github.com/spring-projects/spring-boot/issues/28776") public void testAppendProperties() throws Exception { // This comes out as a String not Integer if the rebinder processes the proxy // instead of the target diff --git a/spring-cloud-context/src/test/java/org/springframework/cloud/context/scope/refresh/RefreshScopeListBindingIntegrationTests.java b/spring-cloud-context/src/test/java/org/springframework/cloud/context/scope/refresh/RefreshScopeListBindingIntegrationTests.java index 2831adac..5e3fab70 100644 --- a/spring-cloud-context/src/test/java/org/springframework/cloud/context/scope/refresh/RefreshScopeListBindingIntegrationTests.java +++ b/spring-cloud-context/src/test/java/org/springframework/cloud/context/scope/refresh/RefreshScopeListBindingIntegrationTests.java @@ -20,6 +20,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.springframework.aop.framework.Advised; @@ -56,6 +57,7 @@ public class RefreshScopeListBindingIntegrationTests { @Test @DirtiesContext + @Disabled("caused by https://github.com/spring-projects/spring-boot/issues/28776") public void testAppendProperties() throws Exception { then("[one, two]").isEqualTo(this.properties.getMessages().toString()); then(this.properties instanceof Advised).isTrue();