Temporarily disables tests.

See gh-1042
This commit is contained in:
spencergibb
2021-11-22 14:47:25 -05:00
parent d639552fb8
commit e47a3a08ce
3 changed files with 15 additions and 10 deletions

View File

@@ -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<String, Object> 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<String, Object> 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<String, Object> 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();
}

View File

@@ -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

View File

@@ -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();