Update to Blockhound 1.0.2 (#10007)

Motivation:

A new version of blockhound was released today

Modifications:

Upgrade to latest blockhound version

Result:

Use latest blockhound release
This commit is contained in:
Norman Maurer 2020-02-08 17:04:28 +01:00
parent f39e741206
commit 2c3833472a
2 changed files with 5 additions and 4 deletions

View File

@ -661,7 +661,7 @@
<dependency> <dependency>
<groupId>io.projectreactor.tools</groupId> <groupId>io.projectreactor.tools</groupId>
<artifactId>blockhound</artifactId> <artifactId>blockhound</artifactId>
<version>1.0.1.RELEASE</version> <version>1.0.2.RELEASE</version>
</dependency> </dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>

View File

@ -39,9 +39,11 @@ import io.netty.util.concurrent.GlobalEventExecutor;
import io.netty.util.concurrent.ImmediateEventExecutor; import io.netty.util.concurrent.ImmediateEventExecutor;
import io.netty.util.concurrent.ImmediateExecutor; import io.netty.util.concurrent.ImmediateExecutor;
import io.netty.util.internal.Hidden.NettyBlockHoundIntegration; import io.netty.util.internal.Hidden.NettyBlockHoundIntegration;
import org.hamcrest.Matchers;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import reactor.blockhound.BlockHound; import reactor.blockhound.BlockHound;
import reactor.blockhound.BlockingOperationError;
import reactor.blockhound.integration.BlockHoundIntegration; import reactor.blockhound.integration.BlockHoundIntegration;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
@ -54,6 +56,7 @@ import java.util.concurrent.FutureTask;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
@ -87,9 +90,7 @@ public class NettyBlockHoundIntegrationTest {
future.get(5, TimeUnit.SECONDS); future.get(5, TimeUnit.SECONDS);
fail("Expected an exception due to a blocking call but none was thrown"); fail("Expected an exception due to a blocking call but none was thrown");
} catch (ExecutionException e) { } catch (ExecutionException e) {
Throwable throwable = e.getCause(); assertThat(e.getCause(), Matchers.instanceOf(BlockingOperationError.class));
assertNotNull("An exception was thrown", throwable);
assertTrue("Blocking call was reported", throwable.getMessage().contains("Blocking call"));
} }
} }