package com.hubspot.singularity.managed;

import com.google.inject.Inject;
import com.hubspot.singularity.SingularityLeaderController;
import com.hubspot.singularity.SingularityManagedScheduledExecutorServiceFactory;
import com.hubspot.singularity.SingularityManagedThreadPoolFactory;
import com.hubspot.singularity.config.SingularityConfiguration;
import com.hubspot.singularity.data.ExecutorIdGenerator;
import com.hubspot.singularity.mesos.SingularityMesosExecutorInfoSupport;
import com.hubspot.singularity.metrics.SingularityGraphiteReporter;
import com.hubspot.singularity.scheduler.SingularityLeaderOnlyPoller;
import com.ning.http.client.AsyncHttpClient;
import java.util.Set;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.recipes.leader.LeaderLatch;

public class SingularityLifecycleManagedTest extends SingularityLifecycleManaged {

  @Inject
  public SingularityLifecycleManagedTest(
    SingularityManagedThreadPoolFactory cachedThreadPoolFactory,
    SingularityManagedScheduledExecutorServiceFactory scheduledExecutorServiceFactory,
    AsyncHttpClient asyncHttpClient,
    CuratorFramework curatorFramework,
    SingularityLeaderController leaderController,
    LeaderLatch leaderLatch,
    SingularityMesosExecutorInfoSupport executorInfoSupport,
    SingularityGraphiteReporter graphiteReporter,
    ExecutorIdGenerator executorIdGenerator,
    Set<SingularityLeaderOnlyPoller> leaderOnlyPollers,
    SingularityConfiguration configuration,
    SingularityPreJettyLifecycle preJettyLifecycle
  ) {
    super(
      cachedThreadPoolFactory,
      scheduledExecutorServiceFactory,
      asyncHttpClient,
      curatorFramework,
      leaderController,
      leaderLatch,
      executorInfoSupport,
      graphiteReporter,
      executorIdGenerator,
      leaderOnlyPollers,
      configuration,
      preJettyLifecycle
    );
  }

  @Override
  protected boolean startLeaderPollers() {
    return false;
  }
}

@@ -378,34 +378,137 @@
 ty.data.
-ExecutorIdGenerato
+DeployManager;%0Aimport com.hubspot.singularity.data.ExecutorIdGenerator;%0Aimport com.hubspot.singularity.data.RequestManage
 r;%0Aimpor
@@ -1649,16 +1649,84 @@
 ifecycle
+,%0A    RequestManager requestManager,%0A    DeployManager deployManager
 %0A  ) %7B%0A 
@@ -2042,16 +2042,59 @@
 ifecycle
+,%0A      requestManager,%0A      deployManager
 %0A    );%0A

Add managers to test Lifecycle