zhedoubushishi commented on a change in pull request #1870: URL: https://github.com/apache/hudi/pull/1870#discussion_r467373477
########## File path: hudi-client/src/test/java/org/apache/hudi/table/TestCleaner.java ########## @@ -885,6 +888,109 @@ private void testKeepLatestCommits(boolean simulateFailureRetry, boolean enableI file2P0C1)); } + @Test + public void testBootstrapSourceFileCleanWithKeepLatestFileVersions() throws IOException { + testBootstrapSourceFileClean(HoodieCleaningPolicy.KEEP_LATEST_FILE_VERSIONS); + } + + @Test + public void testBootstrapSourceFileCleanWithKeepLatestCommits() throws IOException { + testBootstrapSourceFileClean(HoodieCleaningPolicy.KEEP_LATEST_COMMITS); + } + + /** + * Test HoodieTable.clean() with Bootstrap source file clean enable. + */ + @Test + private void testBootstrapSourceFileClean(HoodieCleaningPolicy cleaningPolicy) throws IOException { + HoodieWriteConfig config = HoodieWriteConfig.newBuilder().withPath(basePath).withAssumeDatePartitioning(true) + .withCompactionConfig(HoodieCompactionConfig.newBuilder() + .withCleanBootstrapSourceFileEnabled(true) + .withCleanerPolicy(cleaningPolicy).retainCommits(1).retainFileVersions(2).build()) + .build(); Review comment: Rewrote the test part to make use of the original test code. ---------------------------------------------------------------- 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: us...@infra.apache.org