Update to Spring Boot 1.4 test APIs

This commit is contained in:
Dave Syer
2016-09-15 10:18:19 +01:00
parent 3f72c9e476
commit dc4b4a84f6
42 changed files with 251 additions and 329 deletions

View File

@@ -15,8 +15,7 @@ import org.junit.runner.RunWith;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.support.AopUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.IntegrationTest;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.config.client.ConfigServicePropertySourceLocator;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.retry.annotation.AnnotationAwareRetryOperationsInterceptor;
@@ -24,15 +23,14 @@ import org.springframework.retry.backoff.ExponentialBackOffPolicy;
import org.springframework.retry.interceptor.RetryOperationsInterceptor;
import org.springframework.retry.support.RetryTemplate;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.util.ReflectionTestUtils;
import apps.ConfigServer;
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = StandaloneClientApplication.class)
@RunWith(SpringRunner.class)
// Explicitly enable config client because test classpath has config server on it
@IntegrationTest({ "spring.cloud.config.enabled=true",
@SpringBootTest(properties={ "spring.cloud.config.enabled=true",
"logging.level.org.springframework.retry=TRACE" })
@DirtiesContext
public class StandaloneClientApplicationTests {