diff --git a/client/src/test/java/org/apache/rocketmq/client/consumer/DefaultLitePullConsumerTest.java b/client/src/test/java/org/apache/rocketmq/client/consumer/DefaultLitePullConsumerTest.java index 66832706ebe0c92633d0fb70a6dd2c4c7f582685..5b7e635093ca06e245b66949dd9a7eab60150c4b 100644 --- a/client/src/test/java/org/apache/rocketmq/client/consumer/DefaultLitePullConsumerTest.java +++ b/client/src/test/java/org/apache/rocketmq/client/consumer/DefaultLitePullConsumerTest.java @@ -54,6 +54,7 @@ import org.mockito.Spy; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; import org.powermock.api.mockito.PowerMockito; +import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; @@ -71,6 +72,7 @@ import static org.mockito.Mockito.when; @RunWith(PowerMockRunner.class) @PrepareForTest(DefaultLitePullConsumerImpl.class) +@PowerMockIgnore("javax.management.*") public class DefaultLitePullConsumerTest { @Spy private MQClientInstance mQClientFactory = MQClientManager.getInstance().getOrCreateMQClientInstance(new ClientConfig()); diff --git a/client/src/test/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumerTest.java b/client/src/test/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumerTest.java index 9395451594043f425afc73ceb08d9d8d74c92976..924ee12c84a442eb5a779de80963863773f00403 100644 --- a/client/src/test/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumerTest.java +++ b/client/src/test/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumerTest.java @@ -62,6 +62,7 @@ import org.mockito.Mock; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; import org.powermock.api.mockito.PowerMockito; +import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; @@ -78,6 +79,7 @@ import static org.mockito.Mockito.when; @RunWith(PowerMockRunner.class) @PrepareForTest(DefaultMQPushConsumerImpl.class) +@PowerMockIgnore("javax.management.*") public class DefaultMQPushConsumerTest { private String consumerGroup; private String topic = "FooBar"; 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 6c1380b12e8b06617d706d21f6a3aef8ca5ea95f..5ea517c8f25e16eafadc852578bece02f0609188 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 @@ -73,6 +73,7 @@ import org.mockito.Mock; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; import org.powermock.api.mockito.PowerMockito; +import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; @@ -88,6 +89,7 @@ import static org.mockito.Mockito.when; @RunWith(PowerMockRunner.class) @PrepareForTest(DefaultMQPushConsumerImpl.class) +@PowerMockIgnore("javax.management.*") public class DefaultMQConsumerWithTraceTest { private String consumerGroup; private String consumerGroupNormal;