joeCarf commented on code in PR #7445:
URL: https://github.com/apache/rocketmq/pull/7445#discussion_r1353986301


##########
common/src/test/java/org/apache/rocketmq/common/UtilAllTest.java:
##########
@@ -271,8 +271,19 @@ public void testCalculateFileSizeInPath() throws Exception 
{
 
         assertEquals(1313 * 4, UtilAll.calculateFileSizeInPath(baseFile));
 
-        // clear all file
-        baseFile.deleteOnExit();
+        deleteFolder(baseFile);

Review Comment:
   如果某次fail了,是不是就无法执行到删除逻辑。放在test开始前,每次执行先删除会不会更好



##########
common/src/test/java/org/apache/rocketmq/common/UtilAllTest.java:
##########
@@ -271,8 +271,19 @@ public void testCalculateFileSizeInPath() throws Exception 
{
 
         assertEquals(1313 * 4, UtilAll.calculateFileSizeInPath(baseFile));
 
-        // clear all file
-        baseFile.deleteOnExit();
+        deleteFolder(baseFile);

Review Comment:
   如果某次fail了,是不是就无法执行到删除逻辑。放在test开始前,每次执行先删除会不会更好



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

Reply via email to