geserdugarov commented on code in PR #12796:
URL: https://github.com/apache/hudi/pull/12796#discussion_r1961074297


##########
hudi-flink-datasource/hudi-flink/src/test/java/org/apache/hudi/sink/bucket/ITTestBucketStreamWrite.java:
##########
@@ -91,7 +97,20 @@ public void 
testBucketStreamWriteAfterRollbackFirstFileGroupCreation(boolean isC
     }
   }
 
-  private static void doDeleteCommit(String tablePath, boolean isCow) throws 
Exception {
+  @ParameterizedTest
+  @ValueSource(booleans = {true, false})
+  public void testBucketWriteIntoMultipleBuckets(boolean isCow) throws 
Exception {
+    String tablePath = tempFile.getAbsolutePath();
+    doWrite(tablePath, isCow, 2, "upsert");
+    if (isCow) {
+      TestData.checkWrittenDataCOW(tempFile, EXPECTED_LIST);

Review Comment:
   `TestData::checkWrittenData` expects only one base file:
   
https://github.com/apache/hudi/blob/3525983c90eb2fd02682596ada304ba11897290e/hudi-flink-datasource/hudi-flink/src/test/java/org/apache/hudi/utils/TestData.java#L742-L744
   So I used `TestData::checkWrittenDataCOW` instead.
   
   But `TestData::checkWrittenDataCOW` expects data list for comparison as 
`Map<String, List<String>>`. So I made a duplicate for `Map<String, String> 
EXPECTED` and called it `EXPECTED_LIST`. But I am convinced, that I should 
clean this part after your comment.
   
   In 64a2c129f64c0402a784073dae1071c7cf5f0029, I left only `Map<String, 
List<String>> EXPECTED_AS_LIST` and generate corresponding `Map<String, String> 
EXPECTED` at this part:
   
https://github.com/apache/hudi/pull/12796/commits/64a2c129f64c0402a784073dae1071c7cf5f0029#diff-5e48b1082ac20d788613b6b766aaa7cd80ebaff79ebba86da2f4c9d4176ae1fcR73-R76



-- 
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