Skip to content

Commit

Permalink
Merge a7c03c0 into db00885
Browse files Browse the repository at this point in the history
  • Loading branch information
wenweihu86 committed Sep 16, 2017
2 parents db00885 + a7c03c0 commit b4f8bc3
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public MessageStore buildMessageStore() throws Exception {
messageStoreConfig.setMaxHashSlotNum(10000);
messageStoreConfig.setMaxIndexNum(100 * 100);
messageStoreConfig.setFlushDiskType(FlushDiskType.SYNC_FLUSH);
messageStoreConfig.setFlushIntervalConsumeQueue(1);
return new DefaultMessageStore(messageStoreConfig, new BrokerStatsManager("simpleTest"), new MyMessageArrivingListener(), new BrokerConfig());
}

Expand Down Expand Up @@ -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
Thread.sleep(100);
String group = "simple";
GetMessageResult getMessageResult32 = messageStore.getMessage(group, topic, 0, 0, 32, null);
assertThat(getMessageResult32.getMessageBufferList().size()).isEqualTo(32);
Expand Down

0 comments on commit b4f8bc3

Please sign in to comment.