apache / rocketmq

Apache RocketMQ is a cloud native messaging and streaming platform, making it simple to build event-driven applications.
https://rocketmq.apache.org/
Apache License 2.0
20.78k stars 11.52k forks source link

[Bug] UtilAllTest#testCalculateFileSizeInPath can't delete testfile #7406

Open shirenchuang opened 9 months ago

shirenchuang commented 9 months ago

Before Creating the Bug Report

Runtime platform environment

MacOS12

RocketMQ version

develop

JDK Version

jdk8

Describe the Bug

UtilAllTest#testCalculateFileSizeInPath can't pass test

Because the file was not deleted when the method ended

image

Steps to Reproduce

just run

What Did You Expect to See?

.

What Did You See Instead?

.

Additional Context

No response

francisoliverlee commented 9 months ago

it seems https://github.com/apache/rocketmq/blob/develop/common/src/test/java/org/apache/rocketmq/common/UtilAllTest.java#L275 not work

shirenchuang commented 9 months ago

it seems https://github.com/apache/rocketmq/blob/develop/common/src/test/java/org/apache/rocketmq/common/UtilAllTest.java#L275 not work

right. Because the metohd cannot delete the directory of non-empty files

shirenchuang commented 9 months ago

it seems https://github.com/apache/rocketmq/blob/develop/common/src/test/java/org/apache/rocketmq/common/UtilAllTest.java#L275 not work

Please CR when you have time