@Override
  public void start(Callback<None> callback) {
    LOG.info("{} enabled", _printName);

    Callback<None> prepareWarmUpCallback = new Callback<None>() {
      @Override
      public void onError(Throwable e) {
        if (e instanceof TimeoutException)
        {
          LOG.info("{} hit timeout: {}ms. The WarmUp will continue in background", _printName, _warmUpTimeoutMillis);
          callback.onSuccess(None.none());
        }
        else
        {
          LOG.error("{} failed to fetch dual read mode, continuing warmup.", _printName, e);
        }
        continueWarmUp(callback);
      }

      @Override
      public void onSuccess(None result) {
        continueWarmUp(callback);
      }
    };

    _loadBalancer.start(new Callback<None>() {
      @Override
      public void onError(Throwable e) {
        callback.onError(e);
      }

      @Override
      public void onSuccess(None result) {
        _allStartTime = _timeSupplier.get();
        _executorService.submit(() -> prepareWarmUp(prepareWarmUpCallback));
      }
    });
  }
@Test(timeOut = 10000, retryAnalyzer = ThreeRetries.class)
  public void testHitTimeout() throws URISyntaxException, InterruptedException, ExecutionException, TimeoutException
  {
    int NRequests = 5000;
    int warmUpTimeout = 2;
    int concurrentRequests = 5;
    int requestTime = 100;

    float requestsPerSecond = 1000 / requestTime * concurrentRequests;
    int expectedRequests = (int) (requestsPerSecond * warmUpTimeout);
    int deviation = (int) requestsPerSecond; // we allow inaccuracies of 1s

    createNServicesIniFiles(NRequests);

    TestLoadBalancer balancer = new TestLoadBalancer(requestTime);
    AtomicInteger requestCount = balancer.getRequestCount();
    LoadBalancer warmUpLoadBalancer = new WarmUpLoadBalancer(balancer, balancer, Executors.newSingleThreadScheduledExecutor(),
      _tmpdir.getAbsolutePath(), MY_SERVICES_FS, _FSBasedDownstreamServicesFetcher, warmUpTimeout, concurrentRequests);

    FutureCallback<None> callback = new FutureCallback<>();
    warmUpLoadBalancer.start(callback);

    callback.get();
    Assert.assertTrue(expectedRequests - deviation < requestCount.get()
        && expectedRequests + deviation > requestCount.get(),
      "Expected # of requests between " + expectedRequests + " +/-" + deviation + ", found:" + requestCount.get());
  }