xintongsong commented on a change in pull request #11248: [FLINK-16299] Release 
containers recovered from previous attempt in w…
URL: https://github.com/apache/flink/pull/11248#discussion_r386034363
 
 

 ##########
 File path: 
flink-yarn/src/test/java/org/apache/flink/yarn/YarnResourceManagerTest.java
 ##########
 @@ -222,6 +222,10 @@ MainThreadExecutor getMainThreadExecutorForTesting() {
                        return super.getMainThreadExecutor();
                }
 
+               void setTestingNMClientAsync(TestingNMClientAsync 
testingNMClientAsync) {
+                       this.testingNMClientAsync = testingNMClientAsync;
+               }
 
 Review comment:
   I'm not sure about that. There are quite some fields in `Context`. If for 
each field that needs to be customized we always add it to the `Context` 
constructor parameters, then the constructor will soon become complex, or we 
have to maintain lots of constructors with different parameter combinations.
   
   I think the key point of making `Consumer` and `Function` of 
`TestingNMClientAsync` is that, we can use the same default 
`TestingNMClientAsync` created in `Context`, but still be able to define its 
behavior in the test case. Being able to change it's behavior is only an extra 
benefit.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to