zhijiangW commented on a change in pull request #8242: [FLINK-6227][network]
Introduce the PartitionException for downstream task failure
URL: https://github.com/apache/flink/pull/8242#discussion_r286091905
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/netty/ClientTransportErrorHandlingTest.java
##########
@@ -134,12 +133,10 @@ public Void answer(InvocationOnMock invocation) throws
Throwable {
}).when(rich[1]).onError(isA(LocalTransportException.class));
// First request is successful
- ChannelFuture f = requestClient.requestSubpartition(new
ResultPartitionID(), 0, rich[0], 0);
- assertTrue(f.await().isSuccess());
+ requestClient.requestSubpartition(new ResultPartitionID(), 0,
rich[0], 0);
// Second request is *not* successful
- f = requestClient.requestSubpartition(new ResultPartitionID(),
0, rich[1], 0);
- assertFalse(f.await().isSuccess());
Review comment:
I move the verify of `rich[0]` behind `sync.await` to confirm the future
operations are done. Because the end of `sync.await` indicates the rich[1] is
set on error, and the request of rich[0] which is in front of rich[1] should
also be done.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services