You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/09/22 08:52:11 UTC

[GitHub] [hudi] codope commented on a change in pull request #3695: [HUDI-2395] Metadata tests rewrite

codope commented on a change in pull request #3695:
URL: https://github.com/apache/hudi/pull/3695#discussion_r713731976



##########
File path: hudi-common/src/test/java/org/apache/hudi/common/testutils/HoodieTestTable.java
##########
@@ -144,6 +186,25 @@ public HoodieTestTable addCommit(String instantTime) throws Exception {
     return this;
   }
 
+  public HoodieCommitMetadata createCommitMetadata(WriteOperationType operationType, String commitTime, HoodieTestTableState testTableState) {
+    String actionType = MERGE_ON_READ.equals(metaClient.getTableType()) ? DELTA_COMMIT_ACTION : COMMIT_ACTION;
+    return createCommitMetadata(operationType, commitTime, Collections.emptyMap(), testTableState, false, actionType);
+  }
+
+  public HoodieCommitMetadata createCommitMetadata(WriteOperationType operationType, String commitTime,
+                                                   HoodieTestTableState testTableState, boolean bootstrap) {
+    String actionType = MERGE_ON_READ.equals(metaClient.getTableType()) ? DELTA_COMMIT_ACTION : COMMIT_ACTION;

Review comment:
       There is one actually: `CommitUtils#getCommitActionType`




-- 
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-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org