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

ASF GitHub Bot commented on ROCKETMQ-264:
-----------------------------------------

Github user zhouxinyu commented on a diff in the pull request:

    https://github.com/apache/incubator-rocketmq/pull/145#discussion_r132838549
  
    --- Diff: 
client/src/test/java/org/apache/rocketmq/client/consumer/rebalance/AllocateMessageQueueConsitentHashTest.java
 ---
    @@ -95,14 +95,15 @@ public void testAllocate2() {
     
     
         @Test
    -    public void testRun100RandomCase(){
    -        for(int i=0;i<100;i++){
    -            int consumerSize = new Random().nextInt(200)+1;//1-200
    -            int queueSize = new Random().nextInt(100)+1;//1-100
    -            testAllocate(queueSize,consumerSize);
    +    public void testRun100RandomCase() {
    +        for (int i = 0; i < 10; i++) {
    +            int consumerSize = new Random().nextInt(20) + 1;//1-20
    +            int queueSize = new Random().nextInt(20) + 1;//1-20
    +            testAllocate(queueSize, consumerSize);
                 try {
                     Thread.sleep(1);
    -            } catch (InterruptedException e) {}
    +            } catch (InterruptedException e) {
    --- End diff --
    
    Add exception to method signature is better~


> Unit test cost too long and there is exception in unit test
> -----------------------------------------------------------
>
>                 Key: ROCKETMQ-264
>                 URL: https://issues.apache.org/jira/browse/ROCKETMQ-264
>             Project: Apache RocketMQ
>          Issue Type: Improvement
>            Reporter: lindzh
>            Assignee: vongosling
>
> When run mvn test , it cost too much time and some times there is exception 
> in unit test and the test result is pass



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to