From 761508a9bd24b1f8d310009023bbfe2f4bdac63a Mon Sep 17 00:00:00 2001 From: keranbingaa Date: Thu, 24 Oct 2019 20:52:34 +0800 Subject: [PATCH] modify unit test of producer --- .../rocketmq/client/producer/DefaultMQProducerTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 cb32bda8..35f65e36 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 @@ -185,7 +185,7 @@ public class DefaultMQProducerTest { @Test public void testSendMessageAsync_Success() throws RemotingException, InterruptedException, MQBrokerException, MQClientException { final CountDownLatch countDownLatch = new CountDownLatch(1); -// final AtomicInteger cc = new AtomicInteger(0); + final AtomicInteger cc = new AtomicInteger(0); when(mQClientAPIImpl.getTopicRouteInfoFromNameServer(anyString(), anyLong())).thenReturn(createTopicRoute()); producer.send(message, new SendCallback() { @Override @@ -194,7 +194,7 @@ public class DefaultMQProducerTest { assertThat(sendResult.getOffsetMsgId()).isEqualTo("123"); assertThat(sendResult.getQueueOffset()).isEqualTo(456L); countDownLatch.countDown(); -// cc.incrementAndGet(); + cc.incrementAndGet(); } @Override @@ -202,7 +202,7 @@ public class DefaultMQProducerTest { } }); countDownLatch.await(3000L, TimeUnit.MILLISECONDS); -// assertThat(cc.get()).isEqualTo(1); + assertThat(cc.get()).isEqualTo(1); } @Test -- GitLab