use of org.apache.dubbo.common.timer.HashedWheelTimer in project dubbo by alibaba.
the class HeartBeatTaskTest method setup.
@BeforeEach
public void setup() throws Exception {
long tickDuration = 1000;
heartbeatTimer = new HashedWheelTimer(tickDuration / HEARTBEAT_CHECK_TICK, TimeUnit.MILLISECONDS);
channel = new MockChannel() {
@Override
public URL getUrl() {
return url;
}
};
AbstractTimerTask.ChannelProvider cp = () -> Collections.<Channel>singletonList(channel);
heartbeatTimerTask = new HeartbeatTimerTask(cp, tickDuration / HEARTBEAT_CHECK_TICK, (int) tickDuration);
}
Aggregations