From 3adbca97509f0d184a0aa6b4ec0282d12862bbcc Mon Sep 17 00:00:00 2001 From: huzongtang Date: Fri, 14 Jun 2019 17:10:08 +0800 Subject: [PATCH] [ISSUE #1156]fix failure test cases for acl mqadmin command; --- .../org/apache/rocketmq/client/impl/MQClientAPIImplTest.java | 5 +++++ .../client/trace/DefaultMQConsumerWithTraceTest.java | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client/src/test/java/org/apache/rocketmq/client/impl/MQClientAPIImplTest.java b/client/src/test/java/org/apache/rocketmq/client/impl/MQClientAPIImplTest.java index e3a25b9a..28555959 100644 --- a/client/src/test/java/org/apache/rocketmq/client/impl/MQClientAPIImplTest.java +++ b/client/src/test/java/org/apache/rocketmq/client/impl/MQClientAPIImplTest.java @@ -268,7 +268,12 @@ public class MQClientAPIImplTest { } }).when(remotingClient).invokeSync(anyString(), any(RemotingCommand.class), anyLong()); + String accessKey = "1234567"; + try { + mqClientAPI.deleteAccessConfig(brokerAddr, accessKey, 3 * 1000); + } catch (MQClientException ex) { + } } @Test diff --git a/client/src/test/java/org/apache/rocketmq/client/trace/DefaultMQConsumerWithTraceTest.java b/client/src/test/java/org/apache/rocketmq/client/trace/DefaultMQConsumerWithTraceTest.java index b45ad028..0d00c9bd 100644 --- a/client/src/test/java/org/apache/rocketmq/client/trace/DefaultMQConsumerWithTraceTest.java +++ b/client/src/test/java/org/apache/rocketmq/client/trace/DefaultMQConsumerWithTraceTest.java @@ -200,9 +200,6 @@ public class DefaultMQConsumerWithTraceTest { @Test public void testPullMessage_WithTrace_Success() throws InterruptedException, RemotingException, MQBrokerException, MQClientException { traceProducer.getDefaultMQProducerImpl().getmQClientFactory().registerProducer(producerGroupTraceTemp, traceProducer.getDefaultMQProducerImpl()); - //when(mQClientAPIImpl.getTopicRouteInfoFromNameServer(anyString(), anyLong())).thenReturn(createTopicRoute()); - //when(mQClientTraceAPIImpl.getTopicRouteInfoFromNameServer(anyString(), anyLong())).thenReturn(createTraceTopicRoute()); - final CountDownLatch countDownLatch = new CountDownLatch(1); final MessageExt[] messageExts = new MessageExt[1]; -- GitLab