dongkelun commented on code in PR #5633:
URL: https://github.com/apache/hudi/pull/5633#discussion_r884259544


##########
hudi-utilities/src/test/java/org/apache/hudi/utilities/functional/TestHoodieDeltaStreamer.java:
##########
@@ -1954,11 +1954,13 @@ public void testSqlSourceSource() throws Exception {
     String tableBasePath = dfsBasePath + "/test_sql_source_table" + testNum++;
     HoodieDeltaStreamer deltaStreamer =
         new HoodieDeltaStreamer(TestHelpers.makeConfig(
-            tableBasePath, WriteOperationType.INSERT, 
SqlSource.class.getName(),
+            tableBasePath, WriteOperationType.BULK_INSERT, 
SqlSource.class.getName(),
             Collections.emptyList(), PROPS_FILENAME_TEST_SQL_SOURCE, false,
-            false, 1000, false, null, null, "timestamp", null, true), jsc);
+            false, 1000, false, null, null, "timestamp", "earliest", true), 
jsc);
     deltaStreamer.sync();
     TestHelpers.assertRecordCount(SQL_SOURCE_NUM_RECORDS, tableBasePath, 
sqlContext);
+    deltaStreamer.sync();
+    TestHelpers.assertRecordCount(SQL_SOURCE_NUM_RECORDS * 2, tableBasePath, 
sqlContext);

Review Comment:
   Because the first execution will not throw exceptions, it can run 
successfully. To save the value of `deltastreamer.checkpoint.reset_key`.In the 
second run, this exception will be repeated only when the commitMetadata is not 
null。So we need to run it twice to verify that the exception is resolved



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