ferenc-csaky commented on code in PR #23301:
URL: https://github.com/apache/flink/pull/23301#discussion_r1307420821
##########
flink-runtime/src/test/java/org/apache/flink/runtime/rpc/FencedRpcEndpointTest.java:
##########
@@ -136,16 +132,15 @@ public void testUnfencedRemoteGateway() throws Exception {
.get(timeout.toMilliseconds(), TimeUnit.MILLISECONDS);
fail("This should have failed because we have an unfenced
gateway.");
} catch (ExecutionException e) {
- assertTrue(
- ExceptionUtils.stripExecutionException(e) instanceof
RpcRuntimeException);
+ assertThat(ExceptionUtils.stripExecutionException(e))
+ .isInstanceOf(RpcRuntimeException.class);
Review Comment:
Edit: This can be ignored, since then I realized that
`hasRootCauseInstanceOf` is a more strict condition than
`ExceptionUtils.stripExecutionException`, so it actually modifies the test case.
~~This try/catch can be removed:~~
```java
assertThatThrownBy(
() ->
unfencedGateway
.foobar(timeout)
.get(timeout.toMilliseconds(),
TimeUnit.MILLISECONDS))
.hasRootCauseInstanceOf(RpcRuntimeException.class);
```
--
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]