TisonKun commented on a change in pull request #8783: 
[FLINK-12863][FLINK-12865] Remove concurrency from HeartbeatManager(Sender)Impl
URL: https://github.com/apache/flink/pull/8783#discussion_r295118087
 
 

 ##########
 File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/heartbeat/HeartbeatManagerTest.java
 ##########
 @@ -491,24 +508,24 @@ public void reportPayload(ResourceID resourceID, Object 
payload) {
                }
 
                @Override
-               public CompletableFuture<Integer> retrievePayload(ResourceID 
resourceID) {
+               public Integer retrievePayload(ResourceID resourceID) {
                        if (resourceID.equals(specialId)) {
-                               return 
CompletableFuture.completedFuture(specialResponse);
+                               return specialResponse;
                        } else {
-                               return 
CompletableFuture.completedFuture(defaultResponse);
+                               return defaultResponse;
                        }
                }
        }
 
-       static class TestingHeartbeatListener implements 
HeartbeatListener<Object, Object> {
+       static class SimpleTestingHeartbeatListener implements 
HeartbeatListener<Object, Object> {
 
 Review comment:
   maybe de-duplicate by `extends TestingHeartbeatListener` and constructed by
   
   ```
   super(
     resourceId -> future.complete(resourceID),
     (ignore1, ignore2) -> numberHeartbeatReports++,
     (ignore) -> CompletableFuture.completedFuture(payload)
   );
   this.payload = payload;
   ```

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