wombatu-kun commented on code in PR #12772:
URL: https://github.com/apache/hudi/pull/12772#discussion_r2084212817


##########
hudi-common/src/test/java/org/apache/hudi/common/table/timeline/versioning/BaseTestCommitMetadataSerDe.java:
##########
@@ -243,10 +243,9 @@ protected void testCorruptedJsonFile() {
     Exception ex = assertThrows(IOException.class, () -> 
serDe.deserialize(instant, new ByteArrayInputStream(serialized.get()), () -> 
false, HoodieCommitMetadata.class));
 
     if (serDe instanceof CommitMetadataSerDeV2) {
-      assertEquals(ex.getCause().getMessage(), "Not an Avro data file.");
+      assertEquals("Not an Avro data file.", ex.getCause().getMessage());
     } else {
-      assertEquals(ex.getCause().getMessage(), "No content to map due to 
end-of-input\n"
-          + " at [Source: (ByteArrayInputStream); line: 1, column: 0]");
+      assertTrue(ex.getCause().getMessage().startsWith("No content to map due 
to end-of-input"));

Review Comment:
   Yes, error message changed in Spark 4. I think, this assertion is enough for 
this kind of errors, no need to assert exact messages.



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