bvaradar commented on code in PR #6926: URL: https://github.com/apache/hudi/pull/6926#discussion_r1134846459
########## hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/table/functional/TestCleanPlanExecutor.java: ########## @@ -99,6 +99,206 @@ private static Stream<Arguments> argumentsForTestKeepLatestCommits() { ); } + private static Stream<Arguments> argumentsForTestTriggerCleanEveryNCommits() { + return Stream.of( + Arguments.of(1), + Arguments.of(2), + Arguments.of(3), + Arguments.of(4) + ); + } + + @ParameterizedTest + @MethodSource("argumentsForTestTriggerCleanEveryNCommits") + public void testTriggerCleanEveryNthCommit(int minCommitsToTriggerClean) throws Exception { + HoodieWriteConfig config = HoodieWriteConfig.newBuilder().withPath(basePath) + .withMetadataConfig(HoodieMetadataConfig.newBuilder().withAssumeDatePartitioning(true).enable(false).build()) + .withEmbeddedTimelineServerEnabled(false) + .withCleanConfig(HoodieCleanConfig.newBuilder() + .withFailedWritesCleaningPolicy(HoodieFailedWritesCleaningPolicy.EAGER) + .withCleanerPolicy(HoodieCleaningPolicy.KEEP_LATEST_COMMITS) + .retainCommits(1) + .withMaxCommitsBeforeCleaning(minCommitsToTriggerClean) + .build()).build(); + + HoodieTestTable testTable = HoodieTestTable.of(metaClient); Review Comment: @pratyakshsharma : Can you pass in HoodieTestTable instance to the testcase. That way, you can test for both metadata enabled and disabled (since HoodieMetadataTestTable extends HoodieTestTable)? -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org