dongeforever commented on a change in pull request #165: fix 
DefaultMessageStoreTest bug: wait more time for consume queue build
URL: https://github.com/apache/incubator-rocketmq/pull/165#discussion_r140950837
 
 

 ##########
 File path: 
store/src/test/java/org/apache/rocketmq/store/DefaultMessageStoreTest.java
 ##########
 @@ -148,8 +149,10 @@ public void testPullSize() throws Exception {
             messageExtBrokerInner.setQueueId(0);
             messageStore.putMessage(messageExtBrokerInner);
         }
-        //wait for consume queue build
-        Thread.sleep(10);
+        // wait for consume queue build
+        // the sleep time should be great than
+        // commit log flush interval plus consume queue flush interval
 
 Review comment:
   Such comment is not true, for the disk flush type is SYNC_FLUSH. It only 
need time for build consume queue.
   Normally 10 ms is enough, but for safe, waiting 100ms is OK.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to