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

    https://github.com/apache/incubator-rocketmq/pull/145#discussion_r134974332
  
    --- Diff: 
broker/src/test/java/org/apache/rocketmq/broker/filter/MessageStoreWithFilterTest.java
 ---
    @@ -201,177 +229,143 @@ public void dispatch(DispatchRequest request) {
     
         @Test
         public void testGetMessage_withFilterBitMapAndConsumerChanged() {
    -        int topicCount = 10, msgPerTopic = 10;
    -        ConsumerFilterManager filterManager = 
ConsumerFilterManagerTest.gen(topicCount, msgPerTopic);
    -
    -        DefaultMessageStore master = null;
    +        List<MessageExtBrokerInner> msgs = null;
             try {
    -            master = gen(filterManager);
    +            msgs = putMsg(master, topicCount, msgPerTopic);
             } catch (Exception e) {
                 e.printStackTrace();
                 assertThat(true).isFalse();
             }
     
    +        // sleep to wait for consume queue has been constructed.
             try {
    -            List<MessageExtBrokerInner> msgs = null;
    -            try {
    -                msgs = putMsg(master, topicCount, msgPerTopic);
    -            } catch (Exception e) {
    -                e.printStackTrace();
    -                assertThat(true).isFalse();
    -            }
    -
    -            // sleep to wait for consume queue has been constructed.
    -            try {
    -                Thread.sleep(1000);
    -            } catch (InterruptedException e) {
    -                e.printStackTrace();
    -                assertThat(true).isFalse();
    -            }
    +            Thread.sleep(200);
    --- End diff --
    
    At this time,there is no way to ensure CQ constructed except adding 
countdownlatch to CQ,if only in test,I think there is no need to do this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to