rahil-c commented on code in PR #13948:
URL: https://github.com/apache/hudi/pull/13948#discussion_r2370436450


##########
hudi-spark-datasource/hudi-spark/src/test/java/org/apache/hudi/table/upgrade/TestUpgradeDowngrade.java:
##########
@@ -308,61 +292,20 @@ public void 
testDowngradeToVersionsBelowSixBlocked(HoodieTableVersion fromVersio
         "Exception message should match expected blocked downgrade format");
   }
 
-  @Disabled
-  @ParameterizedTest
-  @MethodSource("metadataTableCorruptionTestVersionPairs")
-  public void testMetadataTableUpgradeDowngradeFailure(HoodieTableVersion 
fromVersion, HoodieTableVersion toVersion) throws Exception {
-    boolean isUpgrade = fromVersion.lesserThan(toVersion);
-    String operation = isUpgrade ? "upgrade" : "downgrade";
-    LOG.info("Testing metadata table failure during {} from version {} to {}", 
operation, fromVersion, toVersion);
-
-    HoodieTableMetaClient originalMetaClient = loadFixtureTable(fromVersion);
-    assertEquals(fromVersion, 
originalMetaClient.getTableConfig().getTableVersion(),
-        "Fixture table should be at expected version");
-
-    HoodieWriteConfig cfg = createWriteConfig(originalMetaClient, true);
-
-    String metadataTablePath = HoodieTableMetadata.getMetadataTableBasePath(
-        originalMetaClient.getBasePath().toString());
-    StoragePath metadataHoodiePath = new StoragePath(metadataTablePath, 
HoodieTableMetaClient.METAFOLDER_NAME);
-    StoragePath propsPath = new StoragePath(metadataHoodiePath, 
HoodieTableConfig.HOODIE_PROPERTIES_FILE);
-    StoragePath backupPropsPath = new StoragePath(metadataHoodiePath, 
HoodieTableConfig.HOODIE_PROPERTIES_FILE_BACKUP);
-
-    String corruptedContent = 
"CORRUPTED_INVALID_CONTENT\n\nTHIS_IS_NOT_VALID_PROPERTIES_FORMAT";
-    try (OutputStream propsOut = 
originalMetaClient.getStorage().create(propsPath, true);
-         OutputStream backupOut = 
originalMetaClient.getStorage().create(backupPropsPath, true)) {
-      propsOut.write(corruptedContent.getBytes());
-      backupOut.write(corruptedContent.getBytes());
-    }
-
-    HoodieUpgradeDowngradeException exception = assertThrows(
-        HoodieUpgradeDowngradeException.class,
-        () -> new UpgradeDowngrade(originalMetaClient, cfg, context(), 
SparkUpgradeDowngradeHelper.getInstance())
-            .run(toVersion, null)
-    );
-    
-    // Verify the specific exception message for metadata table failures
-    String expectedMessage = "Upgrade/downgrade for the Hudi metadata table 
failed. "
-        + "Please try again. If the failure repeats for metadata table, it is 
recommended to disable "
-        + "the metadata table so that the upgrade and downgrade can continue 
for the data table.";
-    assertTrue(exception.getMessage().contains(expectedMessage),
-        "Exception message should contain metadata table failure message");
-  }
-
   private static Stream<Arguments> 
testComplexKeygenValidationDuringUpgradeDowngrade() {
     return Stream.of(
-        Arguments.of(HoodieTableVersion.SIX, HoodieTableVersion.NINE, true),
-        Arguments.of(HoodieTableVersion.SIX, HoodieTableVersion.NINE, false),
-        Arguments.of(HoodieTableVersion.SIX, HoodieTableVersion.EIGHT, true),
-        Arguments.of(HoodieTableVersion.SIX, HoodieTableVersion.EIGHT, false),
-        Arguments.of(HoodieTableVersion.EIGHT, HoodieTableVersion.NINE, true),
-        Arguments.of(HoodieTableVersion.EIGHT, HoodieTableVersion.NINE, false),
-        Arguments.of(HoodieTableVersion.NINE, HoodieTableVersion.SIX, true),
-        Arguments.of(HoodieTableVersion.NINE, HoodieTableVersion.SIX, false),
-        Arguments.of(HoodieTableVersion.NINE, HoodieTableVersion.EIGHT, true),
-        Arguments.of(HoodieTableVersion.NINE, HoodieTableVersion.EIGHT, false),
-        Arguments.of(HoodieTableVersion.EIGHT, HoodieTableVersion.SIX, true),
-        Arguments.of(HoodieTableVersion.EIGHT, HoodieTableVersion.SIX, false)
+            Arguments.of(HoodieTableVersion.SIX, HoodieTableVersion.NINE, 
true),

Review Comment:
   will fix this



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