You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2021/07/14 05:09:31 UTC

[GitHub] [rocketmq] odbozhou commented on a change in pull request #3133: [ISSUE #3102] win10 run unit tests. MessageStoreTestBase.class line86 file.delete()==false

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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org