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/07 02:37:01 UTC

[GitHub] [rocketmq] codersfarm opened a new pull request #3133: [ISSUE #3102] win10 run unit tests. MessageStoreTestBase.class line86 file.delete()==false

codersfarm opened a new pull request #3133:
URL: https://github.com/apache/rocketmq/pull/3133


   **Make sure set the target branch to `develop`**
   
   ## What is the purpose of the change
   
   XXXXX
   
   ## Brief changelog
   
   XX
   
   ## Verifying this change
   
   XXXX
   
   Follow this checklist to help us incorporate your contribution quickly and easily. Notice, `it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR`.
   
   - [x] Make sure there is a [Github issue](https://github.com/apache/rocketmq/issues) filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue. 
   - [x] Format the pull request title like `[ISSUE #123] Fix UnknownException when host config not exist`. Each commit in the pull request should have a meaningful subject line and body.
   - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/rocketmq/tree/master/test).
   - [x] Run `mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install -DskipITs` to make sure unit-test pass. Run `mvn clean test-compile failsafe:integration-test`  to make sure integration-test pass.
   - [ ] If this contribution is large, please file an [Apache Individual Contributor License Agreement](http://www.apache.org/licenses/#clas).
   


-- 
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



[GitHub] [rocketmq] codersfarm closed pull request #3133: [ISSUE #3102] win10 run unit tests. MessageStoreTestBase.class line86 file.delete()==false

Posted by GitBox <gi...@apache.org>.
codersfarm closed pull request #3133:
URL: https://github.com/apache/rocketmq/pull/3133


   


-- 
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



[GitHub] [rocketmq] coveralls edited a comment on pull request #3133: [ISSUE #3102] win10 run unit tests. MessageStoreTestBase.class line86 file.delete()==false

Posted by GitBox <gi...@apache.org>.
coveralls edited a comment on pull request #3133:
URL: https://github.com/apache/rocketmq/pull/3133#issuecomment-875410717


   
   [![Coverage Status](https://coveralls.io/builds/41208861/badge)](https://coveralls.io/builds/41208861)
   
   Coverage decreased (-0.009%) to 54.048% when pulling **878123647cc1e136992dd0ac251e76772a5d3792 on codersfarm:develop1** into **3183122c01cc2d0dc005634d028ccbcb62495bf6 on apache:develop**.
   


-- 
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



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

Posted by GitBox <gi...@apache.org>.
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



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

Posted by GitBox <gi...@apache.org>.
codersfarm commented on a change in pull request #3133:
URL: https://github.com/apache/rocketmq/pull/3133#discussion_r669514566



##########
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:
       ![2021-07-14_190517](https://user-images.githubusercontent.com/38873832/125612285-93e31f56-da01-4ff3-a6f6-7357d29cae53.jpg)
   In linux file.delete() can delete file even if the file is in mmap, but in windows it can't. I'm not familiar with this. Do you have any suggestion?




-- 
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



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

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #3133:
URL: https://github.com/apache/rocketmq/pull/3133#issuecomment-875410717


   
   [![Coverage Status](https://coveralls.io/builds/41167117/badge)](https://coveralls.io/builds/41167117)
   
   Coverage increased (+0.03%) to 54.088% when pulling **ce42f40187cc108123a63e68511fc83f0868e604 on codersfarm:develop1** into **3183122c01cc2d0dc005634d028ccbcb62495bf6 on apache:develop**.
   


-- 
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



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

Posted by GitBox <gi...@apache.org>.
codersfarm commented on a change in pull request #3133:
URL: https://github.com/apache/rocketmq/pull/3133#discussion_r669396529



##########
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:
       thanks for your suggestions, I will 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