vongosling commented on a change in pull request #2167:
URL: https://github.com/apache/rocketmq/pull/2167#discussion_r505136566
##########
File path:
client/src/test/java/org/apache/rocketmq/client/impl/factory/MQClientInstanceTest.java
##########
@@ -42,6 +47,14 @@
private MQClientInstance mqClientInstance =
MQClientManager.getInstance().getOrCreateMQClientInstance(new ClientConfig());
private String topic = "FooBar";
private String group = "FooBarGroup";
+ private ConcurrentMap<String, HashMap<Long, String>> brokerAddrTable = new
ConcurrentHashMap<String, HashMap<Long, String>>();
+
+ @Before
+ public void init() throws Exception {
+ Field field =
MQClientInstance.class.getDeclaredField("brokerAddrTable");
Review comment:
My idea was to remind you to use jmockit's built-in reflection method to
mock private implementation. For some tools, do not use the internal package.
These codes are created mainly by its usage, which is not suitable for direct
import in projects. This is good practice. For this problem, The value of the
two implementations(mock or inject reflection) is not much different. I hope
you could pay attention to this point in the future :-)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]