Removed ModifiedClasspathRunner and used the ClasspathExtensions from the Spring boot test support (#1181)
This commit is contained in:
@@ -17,37 +17,28 @@
|
||||
package org.springframework.cloud.loadbalancer.security;
|
||||
|
||||
import org.apache.catalina.webresources.TomcatURLStreamHandlerFactory;
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.ExpectedException;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.cloud.test.ClassPathExclusions;
|
||||
import org.springframework.cloud.test.ModifiedClassPathRunner;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* @author Dave Syer
|
||||
*
|
||||
*/
|
||||
@RunWith(ModifiedClassPathRunner.class)
|
||||
@ClassPathExclusions("spring-retry-*.jar")
|
||||
public class OAuth2LoadBalancerClientAutoConfigurationTests {
|
||||
|
||||
private ConfigurableApplicationContext context;
|
||||
|
||||
@Rule
|
||||
public ExpectedException expected = ExpectedException.none();
|
||||
|
||||
@Before
|
||||
@BeforeEach
|
||||
public void before() {
|
||||
// FIXME: why do I need to do this? (fails in maven build without it.
|
||||
// https://stackoverflow.com/questions/28911560/tomcat-8-embedded-error-org-apache-catalina-core-containerbase-a-child-con
|
||||
@@ -55,7 +46,7 @@ public class OAuth2LoadBalancerClientAutoConfigurationTests {
|
||||
TomcatURLStreamHandlerFactory.disable();
|
||||
}
|
||||
|
||||
@After
|
||||
@AfterEach
|
||||
public void close() {
|
||||
if (this.context != null) {
|
||||
this.context.close();
|
||||
@@ -63,7 +54,7 @@ public class OAuth2LoadBalancerClientAutoConfigurationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void userInfoNotLoadBalanced() {
|
||||
this.context = new SpringApplicationBuilder(ClientConfiguration.class).properties("spring.config.name=test",
|
||||
"server.port=0", "security.oauth2.resource.userInfoUri:https://example.com").run();
|
||||
@@ -73,7 +64,7 @@ public class OAuth2LoadBalancerClientAutoConfigurationTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
@Disabled
|
||||
public void userInfoLoadBalancedNoRetry() {
|
||||
this.context = new SpringApplicationBuilder(ClientConfiguration.class).properties("spring.config.name=test",
|
||||
"server.port=0", "security.oauth2.resource.userInfoUri:https://nosuchservice",
|
||||
|
||||
Reference in New Issue
Block a user