nsivabalan commented on code in PR #13229:
URL: https://github.com/apache/hudi/pull/13229#discussion_r2103613682


##########
hudi-spark-datasource/hudi-spark/src/test/java/org/apache/hudi/functional/TestGlobalIndexEnableUpdatePartitions.java:
##########
@@ -304,28 +321,28 @@ public void testUdpateSubsetOfRecUpdates(HoodieTableType 
tableType, IndexType in
       // 1st batch: insert 1,2
       String commitTimeAtEpoch0 = getCommitTimeAtUTC(0);
       WriteClientTestUtils.startCommitWithTime(client, commitTimeAtEpoch0);
-      
assertNoWriteErrors(client.upsert(jsc().parallelize(allInserts.subList(0,2), 
2), commitTimeAtEpoch0).collect());
+      client.commit(commitTimeAtEpoch0, 
client.upsert(jsc().parallelize(allInserts.subList(0,2), 2), 
commitTimeAtEpoch0));
       readTableAndValidate(metaClient, new int[] {0, 1}, p1, 0L);
 
       // 2nd batch: update records 1,2 and insert 3
       String commitTimeAtEpoch5 = getCommitTimeAtUTC(5);
       List<HoodieRecord> updatesAtEpoch5 = getUpdates(allInserts.subList(0,3), 
5, payloadClass);
       WriteClientTestUtils.startCommitWithTime(client, commitTimeAtEpoch5);
-      assertNoWriteErrors(client.upsert(jsc().parallelize(updatesAtEpoch5, 2), 
commitTimeAtEpoch5).collect());
+      client.commit(commitTimeAtEpoch5, 
client.upsert(jsc().parallelize(updatesAtEpoch5, 2), commitTimeAtEpoch5));
       readTableAndValidate(metaClient, new int[] {0, 1, 2}, p1, 
getExpectedTsMap(new int[] {0, 1, 2}, new Long[] {5L, 5L, 5L}));
 
       // 3rd batch: update records 1,2,3 and insert 4
       String commitTimeAtEpoch10 = getCommitTimeAtUTC(10);
       List<HoodieRecord> updatesAtEpoch10 = getUpdates(allInserts, 10, 
payloadClass);
       WriteClientTestUtils.startCommitWithTime(client, commitTimeAtEpoch10);
-      assertNoWriteErrors(client.upsert(jsc().parallelize(updatesAtEpoch10, 
2), commitTimeAtEpoch10).collect());
+      client.commit(commitTimeAtEpoch10, 
client.upsert(jsc().parallelize(updatesAtEpoch10, 2), commitTimeAtEpoch10));
       readTableAndValidate(metaClient, new int[] {0, 1, 2, 3}, p1, 
getExpectedTsMap(new int[] {0, 1, 2, 3}, new Long[] {10L, 10L, 10L, 10L}));
 
       // 4th batch: update all from p1 to p2
       String commitTimeAtEpoch20 = getCommitTimeAtUTC(20);
       List<HoodieRecord> updatesAtEpoch20 = getUpdates(allInserts, p2, 20, 
payloadClass);
       WriteClientTestUtils.startCommitWithTime(client, commitTimeAtEpoch20);
-      assertNoWriteErrors(client.upsert(jsc().parallelize(updatesAtEpoch20, 
2), commitTimeAtEpoch20).collect());
+      client.commit(commitTimeAtEpoch20, 
client.upsert(jsc().parallelize(updatesAtEpoch20, 2), commitTimeAtEpoch20));

Review Comment:
   we do read the table and validate immediately. So, assert no write errors is 
redundant. 



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