From a308ac94cd39db3430fb7250d49aa1fccb704f56 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Sat, 8 Feb 2020 17:04:28 +0100 Subject: [PATCH] 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 --- pom.xml | 2 +- .../util/internal/NettyBlockHoundIntegrationTest.java | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 8f94bd6eb1..4341c79f50 100644 --- a/pom.xml +++ b/pom.xml @@ -680,7 +680,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)); } }