Revert some @Ignores after bugfixes in Spring
Also lifts the restriction on @RefreshScope and @Configuration (since that was imposed by a bug). Fixes gh-43
This commit is contained in:
@@ -17,7 +17,6 @@ package org.springframework.cloud.context.scope.refresh;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -32,7 +31,6 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
@SpringApplicationConfiguration(classes = TestConfiguration.class)
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@Ignore("gh-43")
|
||||
public class ImportRefreshScopeIntegrationTests {
|
||||
|
||||
@Autowired
|
||||
@@ -47,7 +45,7 @@ public class ImportRefreshScopeIntegrationTests {
|
||||
@Test
|
||||
public void testSimpleProperties() throws Exception {
|
||||
assertEquals("Hello scope!", service.getMessage());
|
||||
assertEquals("refresh", beanFactory.getBeanDefinition("service").getScope());
|
||||
assertEquals("refresh", beanFactory.getBeanDefinition("scopedTarget.service").getScope());
|
||||
assertEquals("Hello scope!", service.getMessage());
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ package org.springframework.cloud.context.scope.refresh;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
@@ -64,12 +63,11 @@ public class RefreshScopeConfigurationTests {
|
||||
* See gh-43
|
||||
*/
|
||||
@Test
|
||||
@Ignore("gh-43")
|
||||
public void configurationWithRefreshScope() throws Exception {
|
||||
context = new AnnotationConfigApplicationContext(Application.class,
|
||||
PropertyPlaceholderAutoConfiguration.class, RefreshAutoConfiguration.class);
|
||||
Application application = context.getBean(Application.class);
|
||||
assertEquals("refresh", context.getBeanDefinition("application").getScope());
|
||||
assertEquals("refresh", context.getBeanDefinition("scopedTarget.application").getScope());
|
||||
application.hello();
|
||||
refresh();
|
||||
String message = application.hello();
|
||||
@@ -126,6 +124,7 @@ public class RefreshScopeConfigurationTests {
|
||||
@RefreshScope
|
||||
protected static class Application {
|
||||
|
||||
@Value("${message:Hello World!}")
|
||||
String message = "Hello World";
|
||||
|
||||
@RequestMapping("/")
|
||||
|
||||
Reference in New Issue
Block a user