Search in sources :

Example 1 with BootstrapStepExecutor

use of io.cdap.cdap.internal.bootstrap.executor.BootstrapStepExecutor in project cdap by caskdata.

the class BootstrapServiceTest method setupClass.

@BeforeClass
public static void setupClass() {
    Map<BootstrapStep.Type, BootstrapStepExecutor> executors = new HashMap<>();
    executors.put(STEP1.getType(), EXECUTOR1);
    executors.put(STEP2.getType(), EXECUTOR2);
    executors.put(STEP3.getType(), EXECUTOR3);
    List<BootstrapStep> steps = new ArrayList<>(3);
    steps.add(STEP1);
    steps.add(STEP2);
    steps.add(STEP3);
    bootstrapConfig = new BootstrapConfig(steps);
    BootstrapConfigProvider bootstrapConfigProvider = new InMemoryBootstrapConfigProvider(bootstrapConfig);
    bootstrapStore = AppFabricTestHelper.getInjector().getInstance(BootstrapStore.class);
    systemAppManagementService = AppFabricTestHelper.getInjector().getInstance(SystemAppManagementService.class);
    CapabilityManagementService capabilityManagementService = AppFabricTestHelper.getInjector().getInstance(CapabilityManagementService.class);
    SystemProgramManagementService systemProgramManagementService = AppFabricTestHelper.getInjector().getInstance(SystemProgramManagementService.class);
    bootstrapService = new BootstrapService(bootstrapConfigProvider, bootstrapStore, executors, systemAppManagementService, capabilityManagementService, systemProgramManagementService);
    bootstrapService.reload();
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) CapabilityManagementService(io.cdap.cdap.internal.capability.CapabilityManagementService) SystemAppManagementService(io.cdap.cdap.internal.sysapp.SystemAppManagementService) SystemProgramManagementService(io.cdap.cdap.internal.app.services.SystemProgramManagementService) BootstrapStepExecutor(io.cdap.cdap.internal.bootstrap.executor.BootstrapStepExecutor) BeforeClass(org.junit.BeforeClass)

Aggregations

SystemProgramManagementService (io.cdap.cdap.internal.app.services.SystemProgramManagementService)1 BootstrapStepExecutor (io.cdap.cdap.internal.bootstrap.executor.BootstrapStepExecutor)1 CapabilityManagementService (io.cdap.cdap.internal.capability.CapabilityManagementService)1 SystemAppManagementService (io.cdap.cdap.internal.sysapp.SystemAppManagementService)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 BeforeClass (org.junit.BeforeClass)1