diff --git a/pom.xml b/pom.xml index 1869aac793..3689486c3a 100644 --- a/pom.xml +++ b/pom.xml @@ -661,7 +661,7 @@ io.projectreactor.tools blockhound - 1.0.1.RELEASE + 1.0.2.RELEASE diff --git a/transport-blockhound-tests/src/test/java/io/netty/util/internal/NettyBlockHoundIntegrationTest.java b/transport-blockhound-tests/src/test/java/io/netty/util/internal/NettyBlockHoundIntegrationTest.java index 8c7720582f..65b383dab3 100644 --- a/transport-blockhound-tests/src/test/java/io/netty/util/internal/NettyBlockHoundIntegrationTest.java +++ b/transport-blockhound-tests/src/test/java/io/netty/util/internal/NettyBlockHoundIntegrationTest.java @@ -39,9 +39,11 @@ import io.netty.util.concurrent.GlobalEventExecutor; import io.netty.util.concurrent.ImmediateEventExecutor; import io.netty.util.concurrent.ImmediateExecutor; import io.netty.util.internal.Hidden.NettyBlockHoundIntegration; +import org.hamcrest.Matchers; import org.junit.BeforeClass; import org.junit.Test; import reactor.blockhound.BlockHound; +import reactor.blockhound.BlockingOperationError; import reactor.blockhound.integration.BlockHoundIntegration; import java.net.InetSocketAddress; @@ -54,6 +56,7 @@ import java.util.concurrent.FutureTask; import java.util.concurrent.TimeUnit; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertThat; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; @@ -87,9 +90,7 @@ public class NettyBlockHoundIntegrationTest { future.get(5, TimeUnit.SECONDS); fail("Expected an exception due to a blocking call but none was thrown"); } catch (ExecutionException e) { - Throwable throwable = e.getCause(); - assertNotNull("An exception was thrown", throwable); - assertTrue("Blocking call was reported", throwable.getMessage().contains("Blocking call")); + assertThat(e.getCause(), Matchers.instanceOf(BlockingOperationError.class)); } }