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


##########
hudi-flink-datasource/hudi-flink/src/test/java/org/apache/hudi/sink/ITTestDataStreamWrite.java:
##########
@@ -190,40 +182,71 @@ private void testWriteCopyOnWriteWithClustering(boolean 
sortClusteringEnabled) t
       conf.setString(FlinkOptions.CLUSTERING_SORT_COLUMNS, "uuid");
     }
 
-    testWriteToHoodieWithCluster(conf, "cow_write_with_cluster", 1, EXPECTED);
+    writeWithClusterAndCheckExpected(conf, "cow_write_with_cluster", 1, 
EXPECTED);
   }
 
-  private void testWriteToHoodie(
-      Transformer transformer,
-      String jobName,
-      Map<String, List<String>> expected) throws Exception {
-    
testWriteToHoodie(TestConfigurations.getDefaultConf(tempFile.toURI().toString()),
-        Option.of(transformer), jobName, 2, expected);
+  @ParameterizedTest
+  @ValueSource(strings = {"COPY_ON_WRITE", "MERGE_ON_READ"})
+  public void testStreamWriteWithIndexBootstrap(String tableType) throws 
Exception {
+    Configuration conf = 
TestConfigurations.getDefaultConf(tempFile.toURI().toString());
+    conf.setString(FlinkOptions.TABLE_TYPE, tableType);
+
+    writeAndCheckExpected(
+        conf,
+        Option.empty(),
+        tableType + "_index_bootstrap",
+        2,
+        true,
+        true,
+        EXPECTED);
+
+    // check that there is no exceptions during the same with enabled index 
bootstrap
+    conf.setString(FlinkOptions.INDEX_BOOTSTRAP_ENABLED.key(), "true");
+    writeAndCheckExpected(
+        conf,
+        Option.empty(),
+        tableType + "_index_bootstrap",
+        2,
+        true,
+        true,
+        EXPECTED);
   }
 
-  private void testWriteToHoodie(
-      Configuration conf,
+  private void writeWithTransformerAndCheckExpected(
+      Transformer transformer,
       String jobName,
-      int checkpoints,
       Map<String, List<String>> expected) throws Exception {
-    testWriteToHoodie(conf, Option.empty(), jobName, checkpoints, expected);
+    writeAndCheckExpected(
+        TestConfigurations.getDefaultConf(tempFile.toURI().toString()),
+        Option.of(transformer),
+        jobName,
+        2,
+        true,
+        false,
+        expected);
   }
 
-  private void testWriteToHoodie(
+  private void defaultWriteAndCheckExpected(
       Configuration conf,
-      Option<Transformer> transformer,
       String jobName,
-      int checkpoints,
-      Map<String, List<String>> expected) throws Exception {
-    testWriteToHoodie(conf, transformer, jobName, checkpoints, true, expected);
+      int checkpoints) throws Exception {
+    writeAndCheckExpected(
+        conf,
+        Option.empty(),
+        jobName,
+        checkpoints,
+        true,
+        false,
+        EXPECTED);
   }
 
-  private void testWriteToHoodie(
+  private void writeAndCheckExpected(
       Configuration conf,
       Option<Transformer> transformer,
       String jobName,
       int checkpoints,
       boolean restartJob,
+      boolean useFastMode,

Review Comment:
   Missed it. Thanks. Fixed by 8117ca23eff8e72b3667028945273d13404637eb.



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