Browse Source

Updates CustomBlockHoundIntegration to whitelist more netty

2.1.x
Spencer Gibb 5 years ago
parent
commit
2a3389e6a7
No known key found for this signature in database
GPG Key ID: 7788A47380690861
  1. 19
      spring-cloud-gateway-core/src/test/java/reactor/blockhound/integration/CustomBlockHoundIntegration.java

19
spring-cloud-gateway-core/src/test/java/reactor/blockhound/integration/CustomBlockHoundIntegration.java

@ -25,10 +25,15 @@ public class CustomBlockHoundIntegration implements BlockHoundIntegration { @@ -25,10 +25,15 @@ public class CustomBlockHoundIntegration implements BlockHoundIntegration {
@Override
public void applyTo(BlockHound.Builder builder) {
/*
* builder.blockingMethodCallback(it -> { Error error = new Error(it.toString());
* error.printStackTrace(); throw error; });
*/
// builder.blockingMethodCallback(it -> {
// Error error = new Error(it.toString());
// error.printStackTrace();
// throw error;
// });
// Uses Unsafe#park
builder.allowBlockingCallsInside("reactor.core.scheduler.SchedulerTask",
"dispose");
// Uses
// ch.qos.logback.classic.spi.PackagingDataCalculator#getImplementationVersion
@ -69,6 +74,12 @@ public class CustomBlockHoundIntegration implements BlockHoundIntegration { @@ -69,6 +74,12 @@ public class CustomBlockHoundIntegration implements BlockHoundIntegration {
"execute");
builder.allowBlockingCallsInside(
"io.netty.util.concurrent.SingleThreadEventExecutor$6", "run");
// builder.allowBlockingCallsInside("io.netty.util.concurrent.GlobalEventExecutor",
// "takeTask");
// builder.allowBlockingCallsInside("io.netty.util.concurrent.GlobalEventExecutor",
// "addTask");
builder.allowBlockingCallsInside(
"io.netty.util.concurrent.FastThreadLocalRunnable", "run");
// SECURITY RELATED

Loading…
Cancel
Save