Github user zhijiangW commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4533#discussion_r154680022
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannel.java
 ---
    @@ -378,6 +381,11 @@ public void notifyBufferDestroyed() {
                // Nothing to do actually.
        }
     
    +   @VisibleForTesting
    +   public void increaseCredit(int credit) {
    --- End diff --
    
    I considered this way before, but it seems more complicated to do that and 
exceeds the scope of this tests.
    
    My initial idea is just to verify the logic related with handler, and the 
preceding logic related with `RemoteInputChannel` already covered in 
`RemoteInputChannelTest`. 
    
    I know that it may be better to verify the whole process here. But it needs 
to use the real `PartitionRequestClient` to notify the credit via 
`onSenderBacklog`, and the current `PartitionRequestClient` is tied to 
`PartitionRequestClientHandler` not `CreditBasedClientHandler`.
    
    Nevertheless, I will try to do that as your suggested way. :)


---

Reply via email to