Skip to content

Commit 879e6cc

Browse files
[flink][test] make orphan segment dir old to fix empty-dir sweep assertion
BucketCleaner only sweeps empty directories whose mtime is older than the cutoff. createOldSegmentFile was making the file old but leaving the parent directory at 'now', so the post-order sweep skipped it. Add makeOld on the directory to match production reality.
1 parent 577c159 commit 879e6cc

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/flink/action/orphan/OrphanFilesCleanITCase.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -887,6 +887,7 @@ private Path createOldSegmentFile(TablePath tablePath, String fileName) throws E
887887
Path file = segmentDir.resolve(fileName);
888888
Files.write(file, new byte[] {0x42});
889889
makeOld(file);
890+
makeOld(segmentDir);
890891
return file;
891892
}
892893

0 commit comments

Comments
 (0)