nbalajee commented on code in PR #18279:
URL: https://github.com/apache/hudi/pull/18279#discussion_r3047971316


##########
hudi-client/hudi-client-common/src/test/java/org/apache/hudi/table/action/rollback/TestRollbackHelper.java:
##########
@@ -155,49 +144,30 @@ void 
testMaybeDeleteAndCollectStatsWithMultipleRequestsPerFileGroup(HoodieTableV
             .withPartitionPath(partition2)
             .withDeletedFileResult(baseFilePath3.toString(), true)
             .build()));
-    if (tableVersion.greaterThanOrEquals(HoodieTableVersion.EIGHT)) {
-      // For log file rollbacks in table version 8, the log files are deleted 
in parallel
-      // so there is no grouping per file group
-      getFullLogPathList(logFilesToRollback1.keySet(), 
partition2).forEach(logFilePath -> {
-        expected.add(Pair.of(partition2,
-            HoodieRollbackStat.newBuilder()
-                .withPartitionPath(partition2)
-                .withDeletedFileResult(logFilePath, true)
-                .build()));
-      });
-      getFullLogPathList(logFilesToRollback2.keySet(), 
partition2).forEach(logFilePath -> {
-        expected.add(Pair.of(partition2,
-            HoodieRollbackStat.newBuilder()
-                .withPartitionPath(partition2)
-                .withDeletedFileResult(logFilePath, true)
-                .build()));
-      });
-    } else {
-      // For log file rollbacks in table version 6, the log files are kept and
-      // the rollback command log block is added
+    getFullLogPathList(logFilesToRollback1.keySet(), 
partition2).forEach(logFilePath -> {
       expected.add(Pair.of(partition2,
           HoodieRollbackStat.newBuilder()
               .withPartitionPath(partition2)
-              .withRollbackBlockAppendResults(Collections.singletonMap(
-                  storage.getPathInfo(rollbackLogPath1), 1L))
+              .withDeletedFileResult(logFilePath, true)
               .build()));
+    });
+    getFullLogPathList(logFilesToRollback2.keySet(), 
partition2).forEach(logFilePath -> {
       expected.add(Pair.of(partition2,
           HoodieRollbackStat.newBuilder()
               .withPartitionPath(partition2)
-              .withRollbackBlockAppendResults(Collections.singletonMap(
-                  storage.getPathInfo(rollbackLogPath2), 1L))
+              .withDeletedFileResult(logFilePath, true)
               .build()));
-    }
+    });
     expected.add(Pair.of(partition2,
         HoodieRollbackStat.newBuilder()
             .withPartitionPath(partition2)
             .build()));
     assertRollbackStatsEquals(expected, rollbackStats);
   }
 
-  @ParameterizedTest
-  @ValueSource(strings = {"SIX", "EIGHT"})
-  void 
testMaybeDeleteAndCollectStatsWithSingleRequestPerFileGroup(HoodieTableVersion 
tableVersion) throws IOException {
+  @Test
+  void testMaybeDeleteAndCollectStatsWithSingleRequestPerFileGroup() throws 
IOException {
+    HoodieTableVersion tableVersion = HoodieTableVersion.EIGHT;

Review Comment:
   V6 and V8 use different helper classes with different method signatures and 
different expected behaviors. Cannot share a single test.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to