use of com.sequenceiq.cloudbreak.core.flow2.stack.sync.StackSyncFlowConfig in project cloudbreak by hortonworks.
the class Flow2ConfigTest method testFlowConfigurationMapInit.
@Test
public void testFlowConfigurationMapInit() {
List<FlowConfiguration<?>> flowConfigs = new ArrayList<>();
flowConfigs.add(new StackSyncFlowConfig());
flowConfigs.add(new StackTerminationFlowConfig());
given(this.flowConfigs.iterator()).willReturn(flowConfigs.iterator());
Map<String, FlowConfiguration<?>> flowConfigMap = underTest.flowConfigurationMap();
assertEquals("Not all flow type appeared in map!", countEvents(flowConfigs), flowConfigMap.size());
}
use of com.sequenceiq.cloudbreak.core.flow2.stack.sync.StackSyncFlowConfig in project cloudbreak by hortonworks.
the class Flow2ConfigTest method testFlowConfigurationMapInitIfAlreadyExists.
@Test
public void testFlowConfigurationMapInitIfAlreadyExists() {
List<FlowConfiguration<?>> flowConfigs = new ArrayList<>();
StackSyncFlowConfig stackSyncFlowConfig = new StackSyncFlowConfig();
flowConfigs.add(stackSyncFlowConfig);
flowConfigs.add(stackSyncFlowConfig);
given(this.flowConfigs.iterator()).willReturn(flowConfigs.iterator());
thrown.expect(UnsupportedOperationException.class);
thrown.expectMessage("Event already registered: STACK_SYNC_TRIGGER_EVENT");
underTest.flowConfigurationMap();
}
use of com.sequenceiq.cloudbreak.core.flow2.stack.sync.StackSyncFlowConfig in project cloudbreak by hortonworks.
the class Flow2InitializerTest method testInitialize.
@Test
public void testInitialize() {
List<FlowConfiguration<?>> flowConfigs = new ArrayList<>();
flowConfigs.add(new StackSyncFlowConfig());
flowConfigs.add(new StackTerminationFlowConfig());
given(this.flowConfigs.stream()).willReturn(flowConfigs.stream());
underTest.init();
verify(reactor, times(1)).on(any(Selector.class), any(Consumer.class));
}
Aggregations