diff --git a/client/src/test/java/org/apache/rocketmq/client/producer/DefaultMQProducerTest.java b/client/src/test/java/org/apache/rocketmq/client/producer/DefaultMQProducerTest.java index 991a5725299f84a03629a448ab98bdeb347b0e48..38117535730f9f767e1240bfce0e1bb0cb332ca1 100644 --- a/client/src/test/java/org/apache/rocketmq/client/producer/DefaultMQProducerTest.java +++ b/client/src/test/java/org/apache/rocketmq/client/producer/DefaultMQProducerTest.java @@ -398,13 +398,13 @@ public class DefaultMQProducerTest { try { producer.request(message, requestCallback, 3 * 1000L); - failBecauseExceptionWasNotThrown(RemotingSendRequestException.class); - } catch (RemotingSendRequestException e) { + failBecauseExceptionWasNotThrown(Exception.class); + } catch (Exception e) { ConcurrentHashMap responseMap = RequestFutureTable.getRequestFutureTable(); assertThat(responseMap).isNotNull(); for (Map.Entry entry : responseMap.entrySet()) { RequestResponseFuture future = entry.getValue(); - future.getRequestCallback().onException(new Throwable()); + future.getRequestCallback().onException(e); } } countDownLatch.await(3000L, TimeUnit.MILLISECONDS);