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


##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/client/functional/TestHoodieBackedMetadata.java:
##########
@@ -2880,9 +2880,10 @@ public void testErrorCases() throws Exception {
     }
   }
 
-  @Test
-  public void testMetadataTableWithLongLog() throws Exception {
-    init(COPY_ON_WRITE, false);
+  @ParameterizedTest
+  @EnumSource(HoodieTableType.class)

Review Comment:
   hey @wombatu-kun : can you update your patch w/ below changes. 
   ```
   @Test
     public void testMetadataTableWithLongLog() throws Exception {
       init(COPY_ON_WRITE, false);
       final int maxNumDeltacommits = 3;
       writeConfig = getWriteConfigBuilder(true, true, false)
           .withMetadataConfig(HoodieMetadataConfig.newBuilder()
               .enable(true)
               .enableMetrics(false)
               .withMaxNumDeltaCommitsBeforeCompaction(5)
               .withMaxNumDeltacommitsWhenPending(maxNumDeltacommits)
               .build()).build();
       initWriteConfigAndMetatableWriter(writeConfig, true);
   
       // trigger 5 commits so that compaction gets triggered in MDT
       for (int i = 1; i <= 5; i++) {
         doWriteOperation(testTable, String.format("%016d", i));
       }
       // add a pending commit
       testTable.addRequestedCommit(String.format("%016d", 6));
       // add 3 more and we should hit exception.
       for (int i = 7; i <= (7 + maxNumDeltacommits - 1); i++) {
         doWriteOperation(testTable, String.format("%016d", i));
       }
       int instant = 7 + maxNumDeltacommits;
       Throwable t = assertThrows(HoodieMetadataException.class, () -> 
doWriteOperation(testTable, String.format("%016d", instant)));
       assertTrue(t.getMessage().startsWith(String.format("Metadata table's 
deltacommits exceeded %d: ", maxNumDeltacommits)));
     }
   ```



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