gaborgsomogyi commented on code in PR #29193:
URL: https://github.com/apache/flink/pull/29193#discussion_r4025600031


##########
flink-runtime/src/test/java/org/apache/flink/runtime/util/SerializedThrowableTest.java:
##########
@@ -152,10 +152,12 @@ void testCopyPreservesCause() {
         SerializedThrowable serialized = new SerializedThrowable(parent);
         assertThat(serialized.getCause()).isNotNull();
 
+        // Copying a SerializedThrowable must preserve its 
already-correctly-formatted message
+        // verbatim, not recompute it as if `serialized` (a 
SerializedThrowable) were itself the
+        // original exception - that would stamp SerializedThrowable's own 
class name instead of
+        // the originally wrapped exception's.
         SerializedThrowable copy = new SerializedThrowable(serialized);
-        assertThat(copy)
-                .hasMessage(
-                        "org.apache.flink.util.SerializedThrowable: 
java.lang.Exception: parent message");
+        assertThat(copy.getMessage()).isEqualTo(serialized.getMessage());

Review Comment:
   I think this is net wrong so it must be fixed. Since it has quite some 
impact I'm not sure how much waves it could create. I've pulled in the guys 
here: https://github.com/apache/flink/pull/19615/changes#r4025464880



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