[
https://issues.apache.org/jira/browse/ROCKETMQ-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15817742#comment-15817742
]
ASF GitHub Bot commented on ROCKETMQ-38:
----------------------------------------
GitHub user iskl opened a pull request:
https://github.com/apache/incubator-rocketmq/pull/37
[ROCKETMQ-38] Some unit tests for rocketmq-remoting
[ref issue](https://issues.apache.org/jira/browse/ROCKETMQ-38).
I wish to improve unit test coverage for RocketMQ and wrote these
**sample** tests following @vongosling 's guidance.
> 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
@vongosling , @zhouxinyu , Would you mind review these **sample** test code
to see whether the code style is suitable? Peg for suggestion. If that's OK,
The remaining part would be finished just like the sample test code.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/iskl/incubator-rocketmq ROCKETMQ-38
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-rocketmq/pull/37.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #37
----
commit 62da108245029c10f8fe84c8b041ec6c44d73493
Author: Kailai Shao <[email protected]>
Date: 2017-01-10T08:52:09Z
[ROCKETMQ-38] Add unit tests for request & response RemotingCommand
creating.
commit bca350ff17f2fab2aee4e350d0692e08fab59e7c
Author: Kailai Shao <[email protected]>
Date: 2017-01-11T06:36:22Z
[ROCKETMQ-38] Add unit tests for RemotingCommand encoding and decoding
commit 79c5b9951727a499f6481719e31a8306c8ab1959
Author: Kailai Shao <[email protected]>
Date: 2017-01-11T07:46:43Z
[ROCKETMQ-38] According to vongosling's guidance, modify the code style and
use AssertJ instead of JUnit.
----
> 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
> 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)