[ 
https://issues.apache.org/jira/browse/ROCKETMQ-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15817050#comment-15817050
 ] 

vongosling commented on ROCKETMQ-38:
------------------------------------

Good idea. But, firstly, we should provide some guide for Unit test.

1. Using testMethod_Condition naming conversion,
Because it's more friendly for maven surefire and idea moreunit plugin :-)

2. Mock the module's interaction parts.
We can use mockito tool to do this 

3. More assert instead of simple printting
Recommend to use assert4j tool

4. Do not throw exception in test method

5. Use latch instead of thead.sleep

6. Pay more attention for your test time-consuming



> Unit test for RocketMQ
> ----------------------
>
>                 Key: ROCKETMQ-38
>                 URL: https://issues.apache.org/jira/browse/ROCKETMQ-38
>             Project: Apache RocketMQ
>          Issue Type: Bug
>            Reporter: Kailai Shao
>            Assignee: vongosling
>            Priority: Minor
>             Fix For: 4.1.0-incubating
>
>
> The issue is to provide unit tests and improve code coverage for RocketMQ. I 
> would start from sub-module rocketmq-remoting since the sub-module is more 
> independent in the whole project.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to