linliu-code commented on code in PR #10645:
URL: https://github.com/apache/hudi/pull/10645#discussion_r1573968691


##########
hudi-utilities/src/test/java/org/apache/hudi/utilities/offlinejob/TestHoodieClusteringJob.java:
##########
@@ -92,6 +84,58 @@ public void testHoodieClusteringJobWithClean() throws 
Exception {
     HoodieOfflineJobTestBase.TestHelpers.assertNCleanCommits(1, tableBasePath, 
fs);
   }
 
+  @Test
+  public void testPurgePendingInstants() throws Exception {
+    String tableBasePath = basePath + "/purgePendingClustering";
+    Properties props = getPropertiesForKeyGen(true);
+    HoodieWriteConfig config = getWriteConfig(tableBasePath);
+    props.putAll(config.getProps());
+    Properties metaClientProps = HoodieTableMetaClient.withPropertyBuilder()
+        .setTableType(HoodieTableType.COPY_ON_WRITE)
+        .setPayloadClass(HoodieAvroPayload.class)
+        .fromProperties(props)
+        .build();
+
+    metaClient = 
HoodieTableMetaClient.initTableAndGetMetaClient(jsc.hadoopConfiguration(), 
tableBasePath, metaClientProps);
+    client = new SparkRDDWriteClient(context, config);
+
+    writeData(false, client.createNewInstantTime(), 100, true);
+    writeData(false, client.createNewInstantTime(), 100, true);

Review Comment:
   `createNewInstantTime` is introduced in PR: 
https://github.com/apache/hudi/pull/9617. Can we avoid using this? @nsivabalan 



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