[
https://issues.apache.org/jira/browse/ROCKETMQ-231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16122691#comment-16122691
]
ASF GitHub Bot commented on ROCKETMQ-231:
-----------------------------------------
Github user dongeforever commented on a diff in the pull request:
https://github.com/apache/incubator-rocketmq/pull/126#discussion_r132427103
--- Diff:
store/src/test/java/org/apache/rocketmq/store/DefaultMessageStoreTest.java ---
@@ -45,19 +47,22 @@ public void init() throws Exception {
BornHost = new
InetSocketAddress(InetAddress.getByName("127.0.0.1"), 0);
}
+ public MessageStore buildMessageStore() throws Exception {
+ MessageStoreConfig messageStoreConfig = new MessageStoreConfig();
+ messageStoreConfig.setMapedFileSizeCommitLog(1024 * 1024 * 10);
+ messageStoreConfig.setMapedFileSizeConsumeQueue(1024 * 1024 * 10);
+ messageStoreConfig.setMaxHashSlotNum(10000);
+ messageStoreConfig.setMaxIndexNum(100 * 100);
+ messageStoreConfig.setFlushDiskType(FlushDiskType.ASYNC_FLUSH);
+ return new DefaultMessageStore(messageStoreConfig, new
BrokerStatsManager("simpleTest"), new MyMessageArrivingListener(), new
BrokerConfig());
--- End diff --
The MessageStore uses the default store path(~/store).
And the test forgets to delete files in that path.
Two suggestions:
1. create temp path, and set it as storePath
2. delete all the files after the testing
> Pull result size is always less than given size in PullConsumer
> ---------------------------------------------------------------
>
> Key: ROCKETMQ-231
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-231
> Project: Apache RocketMQ
> Issue Type: Bug
> Components: rocketmq-broker
> Affects Versions: 4.0.0-incubating
> Reporter: lindzh
> Assignee: yukon
> Priority: Critical
> Fix For: 4.2.0-incubating
>
>
> When using PullConsumer pull message by default result size is 32,and
> messages is more than 32 in a queue,but broker always returns 31.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)