@Test public void testRepairMultipleGatewayWithAttached() { Stack stack = getStack(MULTIPLE_GATEWAY); when(stackService.findClustersConnectedToDatalakeByDatalakeStackId(STACK_ID)).thenReturn(Set.of(ATTACHED_WORKLOAD)); setupHostGroup(true); Queue<Selectable> eventQueues = underTest.createFlowTriggerEventQueue(new TriggerEventBuilder(stack).withFailedPrimaryGateway().build()); List<String> triggeredOperations = eventQueues.stream().map(Selectable::selector).collect(Collectors.toList()); assertEquals(List.of( "CHANGE_PRIMARY_GATEWAY_TRIGGER_EVENT", "FULL_DOWNSCALE_TRIGGER_EVENT", "FULL_UPSCALE_TRIGGER_EVENT", "EPHEMERAL_CLUSTERS_UPDATE_TRIGGER_EVENT", "RESCHEDULE_STATUS_CHECK_TRIGGER_EVENT"), triggeredOperations); }
@Override public Queue<Selectable> createFlowTriggerEventQueue(ClusterRepairTriggerEvent event) { RepairConfig repairConfig = createRepairConfig(event); return createFlowTriggers(event, repairConfig); }
ClusterRepairFlowEventChainFactory implements FlowEventChainFactory<ClusterRepairTriggerEvent> { @Override public Queue<Selectable> createFlowTriggerEventQueue(ClusterRepairTriggerEvent event) { RepairConfig repairConfig = createRepairConfig(event); return createFlowTriggers(event, repairConfig); } }
ClusterRepairFlowEventChainFactory implements FlowEventChainFactory<ClusterRepairTriggerEvent> { @Override public Queue<Selectable> createFlowTriggerEventQueue(ClusterRepairTriggerEvent event) { RepairConfig repairConfig = createRepairConfig(event); return createFlowTriggers(event, repairConfig); }  }
ClusterRepairFlowEventChainFactory implements FlowEventChainFactory<ClusterRepairTriggerEvent> { @Override public Queue<Selectable> createFlowTriggerEventQueue(ClusterRepairTriggerEvent event) { RepairConfig repairConfig = createRepairConfig(event); return createFlowTriggers(event, repairConfig); }  @Override String initEvent(); @Override Queue<Selectable> createFlowTriggerEventQueue(ClusterRepairTriggerEvent event); }
ClusterRepairFlowEventChainFactory implements FlowEventChainFactory<ClusterRepairTriggerEvent> { @Override public Queue<Selectable> createFlowTriggerEventQueue(ClusterRepairTriggerEvent event) { RepairConfig repairConfig = createRepairConfig(event); return createFlowTriggers(event, repairConfig); }  @Override String initEvent(); @Override Queue<Selectable> createFlowTriggerEventQueue(ClusterRepairTriggerEvent event);  }