mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-15 16:42:14 +00:00
Remove BlockHound dependency
Since it is not yet GA Fixes gh-7220
This commit is contained in:
parent
23d06534e0
commit
404ad9ab45
@ -70,7 +70,6 @@ dependencyManagement {
|
|||||||
dependency 'commons-lang:commons-lang:2.6'
|
dependency 'commons-lang:commons-lang:2.6'
|
||||||
dependency 'commons-logging:commons-logging:1.2'
|
dependency 'commons-logging:commons-logging:1.2'
|
||||||
dependency 'dom4j:dom4j:1.6.1'
|
dependency 'dom4j:dom4j:1.6.1'
|
||||||
dependency 'io.projectreactor.tools:blockhound:1.0.0.M4'
|
|
||||||
dependency 'javax.activation:activation:1.1.1'
|
dependency 'javax.activation:activation:1.1.1'
|
||||||
dependency 'javax.annotation:jsr250-api:1.0'
|
dependency 'javax.annotation:jsr250-api:1.0'
|
||||||
dependency 'javax.inject:javax.inject:1'
|
dependency 'javax.inject:javax.inject:1'
|
||||||
|
@ -17,7 +17,6 @@ dependencies {
|
|||||||
testCompile 'com.fasterxml.jackson.core:jackson-databind'
|
testCompile 'com.fasterxml.jackson.core:jackson-databind'
|
||||||
testCompile 'io.projectreactor.netty:reactor-netty'
|
testCompile 'io.projectreactor.netty:reactor-netty'
|
||||||
testCompile 'io.projectreactor:reactor-test'
|
testCompile 'io.projectreactor:reactor-test'
|
||||||
testCompile 'io.projectreactor.tools:blockhound'
|
|
||||||
|
|
||||||
provided 'javax.servlet:javax.servlet-api'
|
provided 'javax.servlet:javax.servlet-api'
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,6 @@ import okhttp3.mockwebserver.MockResponse;
|
|||||||
import okhttp3.mockwebserver.MockWebServer;
|
import okhttp3.mockwebserver.MockWebServer;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.BeforeClass;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.mockito.ArgumentCaptor;
|
import org.mockito.ArgumentCaptor;
|
||||||
import org.springframework.http.HttpHeaders;
|
import org.springframework.http.HttpHeaders;
|
||||||
@ -42,7 +41,6 @@ import org.springframework.security.oauth2.core.TestOAuth2RefreshTokens;
|
|||||||
import org.springframework.web.context.request.RequestContextHolder;
|
import org.springframework.web.context.request.RequestContextHolder;
|
||||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||||
import org.springframework.web.reactive.function.client.WebClient;
|
import org.springframework.web.reactive.function.client.WebClient;
|
||||||
import reactor.blockhound.BlockHound;
|
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
@ -70,18 +68,6 @@ public class ServletOAuth2AuthorizedClientExchangeFilterFunctionITests {
|
|||||||
private MockHttpServletRequest request;
|
private MockHttpServletRequest request;
|
||||||
private MockHttpServletResponse response;
|
private MockHttpServletResponse response;
|
||||||
|
|
||||||
@BeforeClass
|
|
||||||
public static void setUpBlockingChecks() {
|
|
||||||
// IMPORTANT:
|
|
||||||
// Before enabling BlockHound, we need to white-list `java.lang.Class.getPackage()`.
|
|
||||||
// When the JVM loads `java.lang.Package.getSystemPackage()`, it attempts to
|
|
||||||
// `java.lang.Package.loadManifest()` which is blocking I/O and triggers BlockHound to error.
|
|
||||||
// NOTE: This is an issue with JDK 8. It's been tested on JDK 10 and works fine w/o this white-list.
|
|
||||||
BlockHound.builder()
|
|
||||||
.allowBlockingCallsInside(Class.class.getName(), "getPackage")
|
|
||||||
.install();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
this.clientRegistrationRepository = mock(ClientRegistrationRepository.class);
|
this.clientRegistrationRepository = mock(ClientRegistrationRepository.class);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user