fangzhiheng opened a new issue #2993:
URL: https://github.com/apache/rocketmq/issues/2993


   ```java
   public void testTruncateCQ() throws Exception {
       {
           Test Case
       }
       {
           Test Case
       }
       ...
   }
   ```
   由于他们复用了一个数据目录,而在第一个测试用例执行的时候,程序依然占用着数据目录中的文件句柄,导致第二个测试用例在删除文件时失败,最终断言失败:
   ```java
   DefaultMessageStore messageStore = createDledgerMessageStore(base, group, 
"n0", peers, null, false, 0);  // 此时创建了24个文件
   ```
   ```java
   DefaultMessageStore messageStore = createDledgerMessageStore(base, group, 
"n0", peers, null, false, 4);  // 删除4个
   ```
   
   执行结果如下:
   ```bash
   java.lang.AssertionError: 
   Expected :20
   Actual   :24
   ...
   ```
   
   操作系统:Windows 10 (Linux 无此问题)


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to