reswqa commented on code in PR #22749:
URL: https://github.com/apache/flink/pull/22749#discussion_r1226202413
##########
flink-core/src/test/java/org/apache/flink/api/java/typeutils/runtime/kryo/KryoSerializerClassLoadingTest.java:
##########
@@ -63,8 +63,8 @@ void restoreOriginalClassLoader() {
void guardTestAssumptions() {
assertThatThrownBy(
() ->
Class.forName(OUTSIDE_CLASS_LOADING.getObject().getClass().getName()))
- .isInstanceOf(ClassNotFoundException.class)
- .withFailMessage("This test's assumptions are broken");
+ .withFailMessage("This test's assumptions are broken")
Review Comment:
We'd better put the fail message to the parameter of `assertThatThrownBy` as
this message actually means that this code block should throw an exception, not
just about whether the type match.
For example:
```
assertThatThrownBy(
() ->
Class.forName(OUTSIDE_CLASS_LOADING.getObject().getClass().getName()), "This
test's assumptions are broken")
```
##########
flink-runtime/src/test/java/org/apache/flink/runtime/state/JavaSerializerTest.java:
##########
@@ -60,9 +60,9 @@ public void restoreOriginalClassLoader() {
void guardTest() {
assertThatThrownBy(
Review Comment:
We'd better put the fail message to the parameter of `assertThatThrownBy`.
--
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]