danny0405 commented on code in PR #11137:
URL: https://github.com/apache/hudi/pull/11137#discussion_r1590551681
##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/client/functional/TestHoodieMetadataBootstrap.java:
##########
@@ -261,12 +260,8 @@ private void bootstrapAndVerifyFailure() throws Exception {
writeConfig = getWriteConfig(true, true);
initWriteConfigAndMetatableWriter(writeConfig, true);
syncTableMetadata(writeConfig);
- try {
- validateMetadata(testTable);
- Assertions.fail("Should have failed");
- } catch (IllegalStateException e) {
- // expected
- }
+ Assertions.assertThrows(AssertionFailedError.class, () ->
validateMetadata(testTable),
Review Comment:
Yeah, then we need to throw a specific expection from the
`validateMetadata`. In side `validateMetadata`, we have many assertions for the
equality of partitions and file list, just change the class to Java `Error`,
and also assert the specific error msg.
--
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]