xushiyan commented on code in PR #4913: URL: https://github.com/apache/hudi/pull/4913#discussion_r1205864459
########## hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/table/functional/TestMarkerBasedRollbackStrategy.java: ########## @@ -87,18 +88,58 @@ public void tearDown() throws Exception { @Test public void testMarkerBasedRollbackAppend() throws Exception { + tearDown(); + tableType = HoodieTableType.MERGE_ON_READ; + setUp(); HoodieTestTable testTable = HoodieTestTable.of(metaClient); String f0 = testTable.addRequestedCommit("000") .getFileIdsWithBaseFilesInPartitions("partA").get("partA"); testTable.forCommit("001") - .withMarkerFile("partA", f0, IOType.APPEND); + .withLogMarkerFile("partA", f0, IOType.CREATE); HoodieTable hoodieTable = HoodieSparkTable.create(getConfig(), context, metaClient); List<HoodieRollbackRequest> rollbackRequests = new MarkerBasedRollbackStrategy(hoodieTable, context, getConfig(), "002").getRollbackRequests(new HoodieInstant(HoodieInstant.State.INFLIGHT, HoodieTimeline.COMMIT_ACTION, "001")); assertEquals(1, rollbackRequests.size()); } + @Test + public void testMarkerBasedRollbackAppendWithLogFileMarkers() throws Exception { + tearDown(); + tableType = HoodieTableType.MERGE_ON_READ; Review Comment: if just initMetaClient(tableType) in each testcase should fix the problem. for some testcases, may both table types apply? -- 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