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

 ##########
 File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/heartbeat/TestingHeartbeatServices.java
 ##########
 @@ -18,43 +18,18 @@
 
 package org.apache.flink.runtime.heartbeat;
 
-import org.apache.flink.runtime.clusterframework.types.ResourceID;
 import org.apache.flink.runtime.concurrent.ScheduledExecutor;
-import org.apache.flink.runtime.testingUtils.TestingUtils;
-import org.apache.flink.util.Preconditions;
-
-import org.slf4j.Logger;
 
 /**
  * A {@link HeartbeatServices} that allows the injection of a {@link 
ScheduledExecutor}.
  */
 public class TestingHeartbeatServices extends HeartbeatServices {
 
-       private final ScheduledExecutor scheduledExecutorToUse;
-
-       public TestingHeartbeatServices(long heartbeatInterval, long 
heartbeatTimeout, ScheduledExecutor scheduledExecutorToUse) {
+       public TestingHeartbeatServices(long heartbeatInterval, long 
heartbeatTimeout) {
                super(heartbeatInterval, heartbeatTimeout);
-
-               this.scheduledExecutorToUse = 
Preconditions.checkNotNull(scheduledExecutorToUse);
        }
 
        public TestingHeartbeatServices() {
-               this(1000L, 10000L, TestingUtils.defaultScheduledExecutor());
-       }
-
-       @Override
-       public <I, O> HeartbeatManager<I, O> createHeartbeatManagerSender(
-               ResourceID resourceId,
-               HeartbeatListener<I, O> heartbeatListener,
-               ScheduledExecutor mainThreadExecutor,
-               Logger log) {
-
-               return new HeartbeatManagerSenderImpl<>(
-                       heartbeatInterval,
-                       heartbeatTimeout,
-                       resourceId,
-                       heartbeatListener,
-                       scheduledExecutorToUse,
-                       log);
+               this(1000L, 10000L);
 
 Review comment:
   seems this class is not needed any more or at least the comment is outdated

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