odbozhou commented on a change in pull request #3133:
URL: https://github.com/apache/rocketmq/pull/3133#discussion_r669293774
##########
File path:
store/src/test/java/org/apache/rocketmq/store/dledger/DLedgerCommitlogTest.java
##########
@@ -65,34 +65,43 @@ public void testTruncateCQ() throws Exception {
messageStore.shutdown();
}
- {
- //Abnormal recover, left some commitlogs
- DefaultMessageStore messageStore = createDledgerMessageStore(base,
group, "n0", peers, null, true, 4);
- DLedgerCommitLog dLedgerCommitLog = (DLedgerCommitLog)
messageStore.getCommitLog();
- DLedgerServer dLedgerServer = dLedgerCommitLog.getdLedgerServer();
- DLedgerMmapFileStore dLedgerMmapFileStore = (DLedgerMmapFileStore)
dLedgerServer.getdLedgerStore();
- MmapFileList mmapFileList = dLedgerMmapFileStore.getDataFileList();
- Thread.sleep(1000);
- Assert.assertEquals(20, mmapFileList.getMappedFiles().size());
- Assert.assertEquals(0, messageStore.getMinOffsetInQueue(topic, 0));
- Assert.assertEquals(1700, messageStore.getMaxOffsetInQueue(topic,
0));
- Assert.assertEquals(0, messageStore.dispatchBehindBytes());
- doGetMessages(messageStore, topic, 0, 1700, 0);
- messageStore.shutdown();
+ try {
Review comment:
It is not a good way to add exception capture in the test case, it is
best to find the cause of the error and fix it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]