1996fanrui commented on code in PR #23199:
URL: https://github.com/apache/flink/pull/23199#discussion_r1303221934
##########
flink-runtime/src/test/java/org/apache/flink/runtime/util/SerializedThrowableTest.java:
##########
@@ -86,49 +84,43 @@ public void testSerialization() {
String.format(
"%s: %s",
userException2.getClass().getName(),
userException2.getMessage());
- assertEquals(serialized2.getMessage(), result);
+ assertThat(serialized2).hasMessage(result);
// copy the serialized throwable and make sure everything still
works
SerializedThrowable copy =
CommonTestUtils.createCopySerializable(serialized);
- assertEquals(
- ExceptionUtils.stringifyException(userException),
- ExceptionUtils.stringifyException(copy));
- assertArrayEquals(userException.getStackTrace(),
copy.getStackTrace());
+ assertThat(ExceptionUtils.stringifyException(userException))
+ .isEqualTo(ExceptionUtils.stringifyException(copy));
+
assertThat(userException.getStackTrace()).isEqualTo(copy.getStackTrace());
// deserialize the proper exception
Throwable deserialized = copy.deserializeError(loader);
- assertEquals(clazz, deserialized.getClass());
+ assertThat(deserialized.getClass()).isEqualTo(clazz);
Review Comment:
```suggestion
assertThat(deserialized).isInstanceOf(clazz);
```
How about this?
##########
flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/util/TestLogger.java:
##########
@@ -31,7 +31,10 @@
/**
* Adds automatic test name logging. Every test which wants to log which test
is currently executed
* and why it failed, simply has to extend this class.
+ *
+ * @deprecated Continue using {@link TestLoggerExtension} with Junit5 tests.
*/
+@Deprecated
Review Comment:
Hi @X-czh , could you remove this commit, and squash all commit after
address other comments?
Because most of junit4 classes are not marked to `Deprecated` so far, if you
want to do it, it's better to do it in a separate JIRA, and mark all classes
togother.
WDYT?
--
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]