[ https://issues.apache.org/jira/browse/ROCKETMQ-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16139842#comment-16139842 ]
ASF GitHub Bot commented on ROCKETMQ-264: ----------------------------------------- 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. > 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)