tillrohrmann commented on a change in pull request #8242: [FLINK-6227][network] 
Introduce the DataConsumptionException for downstream task failure
URL: https://github.com/apache/flink/pull/8242#discussion_r280480963
 
 

 ##########
 File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/consumer/LocalInputChannelTest.java
 ##########
 @@ -260,13 +265,20 @@ public void testProducerFailedException() throws 
Exception {
                BufferProvider bufferProvider = mock(BufferProvider.class);
                when(inputGate.getBufferProvider()).thenReturn(bufferProvider);
 
+               ResultPartitionID partitionId = new ResultPartitionID();
                LocalInputChannel ch = createLocalInputChannel(
-                               inputGate, partitionManager, new Tuple2<>(0, 
0));
+                       inputGate, partitionId, partitionManager, new 
Tuple2<>(0, 0));
 
                ch.requestSubpartition(0);
 
-               // Should throw an instance of CancelTaskException.
-               ch.getNextBuffer();
+               // Should throw an instance of DataConsumptionException.
+               try {
+                       ch.getNextBuffer();
+                       fail("Did not throw expected DataConsumptionException");
+               } catch (IOException ex) {
 
 Review comment:
   Can't we simply catch a `DataConsumptionException` here instead of calling 
`verifyDataConsumptionException`?

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

Reply via email to