Search in sources :

Example 86 with InstanceMetaData

use of com.sequenceiq.cloudbreak.domain.stack.instance.InstanceMetaData in project cloudbreak by hortonworks.

the class StackCreatorServiceTest method validateInstanceMetadataSubnetAndAvailabilityZoneAndRackId.

private void validateInstanceMetadataSubnetAndAvailabilityZoneAndRackId(String hostGroup, int nodeCount, Set<InstanceMetaData> instanceMetaData, String subnetIdExpected, String availabilityZoneExpected, String rackIdExpected) {
    assertEquals(nodeCount, instanceMetaData.size(), "Instance Metadata size should match for hostgroup: " + hostGroup);
    for (InstanceMetaData im : instanceMetaData) {
        assertThat(im.getSubnetId()).overridingErrorMessage("Subnet Id should match for hostgroup: " + hostGroup).isEqualTo(subnetIdExpected);
        assertThat(im.getAvailabilityZone()).overridingErrorMessage("Availability Zone should match for hostgroup: " + hostGroup).isEqualTo(availabilityZoneExpected);
        assertThat(im.getRackId()).overridingErrorMessage("Rack Id should match for hostgroup: " + hostGroup).isEqualTo(rackIdExpected);
    }
}
Also used : InstanceMetaData(com.sequenceiq.cloudbreak.domain.stack.instance.InstanceMetaData)

Example 87 with InstanceMetaData

use of com.sequenceiq.cloudbreak.domain.stack.instance.InstanceMetaData in project cloudbreak by hortonworks.

the class StopStartDownscaleDecommissionViaCMHandlerTest method testErrorFromCmHostCollection.

@Test
void testErrorFromCmHostCollection() {
    int instancesToDecommissionCount = 5;
    int expcetedInstanceToCollectCount = 5;
    int expectedInstancesDecommissionedCount = 5;
    List<InstanceMetaData> instancesToDecommission = getInstancesToDecommission(instancesToDecommissionCount);
    HostGroup hostGroup = createHostGroup(instancesToDecommission);
    Map<String, InstanceMetaData> collected = instancesToDecommission.stream().limit(expcetedInstanceToCollectCount).collect(Collectors.toMap(i -> i.getDiscoveryFQDN(), i -> i));
    List<InstanceMetaData> decommissionedMetadataList = collected.values().stream().limit(expectedInstancesDecommissionedCount).collect(Collectors.toList());
    Set<String> fqdnsDecommissioned = decommissionedMetadataList.stream().map(InstanceMetaData::getDiscoveryFQDN).collect(Collectors.toUnmodifiableSet());
    Set<Long> instanceIdsToDecommission = instancesToDecommission.stream().map(InstanceMetaData::getPrivateId).collect(Collectors.toUnmodifiableSet());
    Set<String> hostnamesToDecommission = instancesToDecommission.stream().map(InstanceMetaData::getDiscoveryFQDN).collect(Collectors.toUnmodifiableSet());
    setupAdditionalMocks(hostGroup, instancesToDecommission, collected, fqdnsDecommissioned);
    when(clusterDecomissionService.collectHostsToRemove(eq(hostGroup), eq(hostnamesToDecommission))).thenThrow(new RuntimeException("collectHostsToDecommissionError"));
    StopStartDownscaleDecommissionViaCMRequest request = new StopStartDownscaleDecommissionViaCMRequest(1L, INSTANCE_GROUP_NAME, instanceIdsToDecommission);
    HandlerEvent handlerEvent = new HandlerEvent(Event.wrap(request));
    Selectable selectable = underTest.doAccept(handlerEvent);
    verify(clusterDecomissionService).collectHostsToRemove(eq(hostGroup), eq(hostnamesToDecommission));
    assertThat(selectable).isInstanceOf(StopStartDownscaleDecommissionViaCMResult.class);
    StopStartDownscaleDecommissionViaCMResult result = (StopStartDownscaleDecommissionViaCMResult) selectable;
    assertThat(result.getNotDecommissionedHostFqdns()).hasSize(0);
    assertThat(result.getDecommissionedHostFqdns()).hasSize(0);
    assertThat(result.getErrorDetails().getMessage()).isEqualTo("collectHostsToDecommissionError");
    assertThat(result.getStatus()).isEqualTo(EventStatus.FAILED);
    assertThat(result.selector()).isEqualTo("STOPSTARTDOWNSCALEDECOMMISSIONVIACMRESULT_ERROR");
    verifyNoMoreInteractions(instanceMetaDataService);
    verifyNoMoreInteractions(flowMessageService);
    verifyNoMoreInteractions(clusterDecomissionService);
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) Stack(com.sequenceiq.cloudbreak.domain.stack.Stack) Cluster(com.sequenceiq.cloudbreak.domain.stack.cluster.Cluster) BeforeEach(org.junit.jupiter.api.BeforeEach) ClusterDecomissionService(com.sequenceiq.cloudbreak.cluster.api.ClusterDecomissionService) StopStartDownscaleDecommissionViaCMResult(com.sequenceiq.cloudbreak.reactor.api.event.orchestration.StopStartDownscaleDecommissionViaCMResult) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) CLUSTER_SCALING_STOPSTART_DOWNSCALE_ENTEREDCMMAINTMODE(com.sequenceiq.cloudbreak.event.ResourceEvent.CLUSTER_SCALING_STOPSTART_DOWNSCALE_ENTEREDCMMAINTMODE) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) Mock(org.mockito.Mock) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) Selectable(com.sequenceiq.cloudbreak.common.event.Selectable) HostGroupService(com.sequenceiq.cloudbreak.service.hostgroup.HostGroupService) Mockito.lenient(org.mockito.Mockito.lenient) ArrayList(java.util.ArrayList) ClusterApi(com.sequenceiq.cloudbreak.cluster.api.ClusterApi) HashSet(java.util.HashSet) UPDATE_IN_PROGRESS(com.sequenceiq.cloudbreak.api.endpoint.v4.common.Status.UPDATE_IN_PROGRESS) CLUSTER_SCALING_STOPSTART_DOWNSCALE_ENTERINGCMMAINTMODE(com.sequenceiq.cloudbreak.event.ResourceEvent.CLUSTER_SCALING_STOPSTART_DOWNSCALE_ENTERINGCMMAINTMODE) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) Event(reactor.bus.Event) Mockito.verifyNoMoreInteractions(org.mockito.Mockito.verifyNoMoreInteractions) CloudbreakFlowMessageService(com.sequenceiq.cloudbreak.core.flow2.stack.CloudbreakFlowMessageService) Map(java.util.Map) InstanceMetaDataService(com.sequenceiq.cloudbreak.service.stack.InstanceMetaDataService) InjectMocks(org.mockito.InjectMocks) MockitoExtension(org.mockito.junit.jupiter.MockitoExtension) InstanceStatus(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.InstanceStatus) Set(java.util.Set) HandlerEvent(com.sequenceiq.flow.reactor.api.handler.HandlerEvent) Mockito.when(org.mockito.Mockito.when) EventStatus(com.sequenceiq.cloudbreak.cloud.event.model.EventStatus) Collectors(java.util.stream.Collectors) Mockito.verify(org.mockito.Mockito.verify) Test(org.junit.jupiter.api.Test) StopStartDownscaleDecommissionViaCMRequest(com.sequenceiq.cloudbreak.reactor.api.event.cluster.StopStartDownscaleDecommissionViaCMRequest) List(java.util.List) HostGroup(com.sequenceiq.cloudbreak.domain.stack.cluster.host.HostGroup) InstanceMetaData(com.sequenceiq.cloudbreak.domain.stack.instance.InstanceMetaData) ClusterApiConnectors(com.sequenceiq.cloudbreak.service.cluster.ClusterApiConnectors) Optional(java.util.Optional) InstanceGroup(com.sequenceiq.cloudbreak.domain.stack.instance.InstanceGroup) StackService(com.sequenceiq.cloudbreak.service.stack.StackService) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) StopStartDownscaleDecommissionViaCMResult(com.sequenceiq.cloudbreak.reactor.api.event.orchestration.StopStartDownscaleDecommissionViaCMResult) HostGroup(com.sequenceiq.cloudbreak.domain.stack.cluster.host.HostGroup) StopStartDownscaleDecommissionViaCMRequest(com.sequenceiq.cloudbreak.reactor.api.event.cluster.StopStartDownscaleDecommissionViaCMRequest) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) InstanceMetaData(com.sequenceiq.cloudbreak.domain.stack.instance.InstanceMetaData) Selectable(com.sequenceiq.cloudbreak.common.event.Selectable) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) HandlerEvent(com.sequenceiq.flow.reactor.api.handler.HandlerEvent) Test(org.junit.jupiter.api.Test)

Example 88 with InstanceMetaData

use of com.sequenceiq.cloudbreak.domain.stack.instance.InstanceMetaData in project cloudbreak by hortonworks.

the class StopStartDownscaleDecommissionViaCMHandlerTest method getInstancesToDecommission.

private List<InstanceMetaData> getInstancesToDecommission(int count) {
    List<InstanceMetaData> instances = new ArrayList<>(count);
    InstanceGroup instanceGroup = new InstanceGroup();
    instanceGroup.setGroupName(INSTANCE_GROUP_NAME);
    for (int i = 0; i < count; i++) {
        InstanceMetaData instanceMetaData = new InstanceMetaData();
        instanceMetaData.setInstanceId(INSTANCE_ID_PREFIX + i);
        instanceMetaData.setInstanceStatus(InstanceStatus.SERVICES_HEALTHY);
        instanceMetaData.setInstanceGroup(instanceGroup);
        instanceMetaData.setDiscoveryFQDN(INSTANCE_ID_PREFIX + i);
        instanceMetaData.setPrivateId((long) i);
        instances.add(instanceMetaData);
    }
    return instances;
}
Also used : InstanceMetaData(com.sequenceiq.cloudbreak.domain.stack.instance.InstanceMetaData) ArrayList(java.util.ArrayList) InstanceGroup(com.sequenceiq.cloudbreak.domain.stack.instance.InstanceGroup)

Example 89 with InstanceMetaData

use of com.sequenceiq.cloudbreak.domain.stack.instance.InstanceMetaData in project cloudbreak by hortonworks.

the class StopStartDownscaleDecommissionViaCMHandlerTest method testNoNodesAvailableInCm.

@Test
void testNoNodesAvailableInCm() {
    int instancesToDecommissionCount = 5;
    int expcetedInstanceToCollectCount = 0;
    int expectedInstancesDecommissionedCount = 0;
    List<InstanceMetaData> instancesToDecommission = getInstancesToDecommission(instancesToDecommissionCount);
    HostGroup hostGroup = createHostGroup(instancesToDecommission);
    Map<String, InstanceMetaData> collected = instancesToDecommission.stream().limit(expcetedInstanceToCollectCount).collect(Collectors.toMap(i -> i.getDiscoveryFQDN(), i -> i));
    List<InstanceMetaData> decommissionedMetadataList = collected.values().stream().limit(expectedInstancesDecommissionedCount).collect(Collectors.toList());
    Set<String> fqdnsDecommissioned = decommissionedMetadataList.stream().map(InstanceMetaData::getDiscoveryFQDN).collect(Collectors.toUnmodifiableSet());
    setupAdditionalMocks(hostGroup, instancesToDecommission, collected, fqdnsDecommissioned);
    Set<Long> instanceIdsToDecommission = instancesToDecommission.stream().map(InstanceMetaData::getPrivateId).collect(Collectors.toUnmodifiableSet());
    Set<String> hostnamesToDecommission = instancesToDecommission.stream().map(InstanceMetaData::getDiscoveryFQDN).collect(Collectors.toUnmodifiableSet());
    StopStartDownscaleDecommissionViaCMRequest request = new StopStartDownscaleDecommissionViaCMRequest(1L, INSTANCE_GROUP_NAME, instanceIdsToDecommission);
    HandlerEvent handlerEvent = new HandlerEvent(Event.wrap(request));
    Selectable selectable = underTest.doAccept(handlerEvent);
    assertThat(selectable).isInstanceOf(StopStartDownscaleDecommissionViaCMResult.class);
    StopStartDownscaleDecommissionViaCMResult result = (StopStartDownscaleDecommissionViaCMResult) selectable;
    assertThat(result.getDecommissionedHostFqdns()).hasSize(expectedInstancesDecommissionedCount);
    assertThat(result.getNotDecommissionedHostFqdns()).hasSize(instancesToDecommissionCount - expectedInstancesDecommissionedCount);
    verifyNoMoreInteractions(instanceMetaDataService);
    verify(clusterDecomissionService).collectHostsToRemove(eq(hostGroup), eq(hostnamesToDecommission));
    verifyNoMoreInteractions(flowMessageService);
    verifyNoMoreInteractions(clusterDecomissionService);
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) Stack(com.sequenceiq.cloudbreak.domain.stack.Stack) Cluster(com.sequenceiq.cloudbreak.domain.stack.cluster.Cluster) BeforeEach(org.junit.jupiter.api.BeforeEach) ClusterDecomissionService(com.sequenceiq.cloudbreak.cluster.api.ClusterDecomissionService) StopStartDownscaleDecommissionViaCMResult(com.sequenceiq.cloudbreak.reactor.api.event.orchestration.StopStartDownscaleDecommissionViaCMResult) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) CLUSTER_SCALING_STOPSTART_DOWNSCALE_ENTEREDCMMAINTMODE(com.sequenceiq.cloudbreak.event.ResourceEvent.CLUSTER_SCALING_STOPSTART_DOWNSCALE_ENTEREDCMMAINTMODE) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) Mock(org.mockito.Mock) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) Selectable(com.sequenceiq.cloudbreak.common.event.Selectable) HostGroupService(com.sequenceiq.cloudbreak.service.hostgroup.HostGroupService) Mockito.lenient(org.mockito.Mockito.lenient) ArrayList(java.util.ArrayList) ClusterApi(com.sequenceiq.cloudbreak.cluster.api.ClusterApi) HashSet(java.util.HashSet) UPDATE_IN_PROGRESS(com.sequenceiq.cloudbreak.api.endpoint.v4.common.Status.UPDATE_IN_PROGRESS) CLUSTER_SCALING_STOPSTART_DOWNSCALE_ENTERINGCMMAINTMODE(com.sequenceiq.cloudbreak.event.ResourceEvent.CLUSTER_SCALING_STOPSTART_DOWNSCALE_ENTERINGCMMAINTMODE) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) Event(reactor.bus.Event) Mockito.verifyNoMoreInteractions(org.mockito.Mockito.verifyNoMoreInteractions) CloudbreakFlowMessageService(com.sequenceiq.cloudbreak.core.flow2.stack.CloudbreakFlowMessageService) Map(java.util.Map) InstanceMetaDataService(com.sequenceiq.cloudbreak.service.stack.InstanceMetaDataService) InjectMocks(org.mockito.InjectMocks) MockitoExtension(org.mockito.junit.jupiter.MockitoExtension) InstanceStatus(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.InstanceStatus) Set(java.util.Set) HandlerEvent(com.sequenceiq.flow.reactor.api.handler.HandlerEvent) Mockito.when(org.mockito.Mockito.when) EventStatus(com.sequenceiq.cloudbreak.cloud.event.model.EventStatus) Collectors(java.util.stream.Collectors) Mockito.verify(org.mockito.Mockito.verify) Test(org.junit.jupiter.api.Test) StopStartDownscaleDecommissionViaCMRequest(com.sequenceiq.cloudbreak.reactor.api.event.cluster.StopStartDownscaleDecommissionViaCMRequest) List(java.util.List) HostGroup(com.sequenceiq.cloudbreak.domain.stack.cluster.host.HostGroup) InstanceMetaData(com.sequenceiq.cloudbreak.domain.stack.instance.InstanceMetaData) ClusterApiConnectors(com.sequenceiq.cloudbreak.service.cluster.ClusterApiConnectors) Optional(java.util.Optional) InstanceGroup(com.sequenceiq.cloudbreak.domain.stack.instance.InstanceGroup) StackService(com.sequenceiq.cloudbreak.service.stack.StackService) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) StopStartDownscaleDecommissionViaCMResult(com.sequenceiq.cloudbreak.reactor.api.event.orchestration.StopStartDownscaleDecommissionViaCMResult) HostGroup(com.sequenceiq.cloudbreak.domain.stack.cluster.host.HostGroup) StopStartDownscaleDecommissionViaCMRequest(com.sequenceiq.cloudbreak.reactor.api.event.cluster.StopStartDownscaleDecommissionViaCMRequest) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) InstanceMetaData(com.sequenceiq.cloudbreak.domain.stack.instance.InstanceMetaData) Selectable(com.sequenceiq.cloudbreak.common.event.Selectable) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) HandlerEvent(com.sequenceiq.flow.reactor.api.handler.HandlerEvent) Test(org.junit.jupiter.api.Test)

Example 90 with InstanceMetaData

use of com.sequenceiq.cloudbreak.domain.stack.instance.InstanceMetaData in project cloudbreak by hortonworks.

the class StopStartDownscaleDecommissionViaCMHandlerTest method testNoNodesFromCMDecommission.

@Test
void testNoNodesFromCMDecommission() {
    int instancesToDecommissionCount = 5;
    int expcetedInstanceToCollectCount = 4;
    int expectedInstancesDecommissionedCount = 0;
    List<InstanceMetaData> instancesToDecommission = getInstancesToDecommission(instancesToDecommissionCount);
    HostGroup hostGroup = createHostGroup(instancesToDecommission);
    Map<String, InstanceMetaData> collected = instancesToDecommission.stream().limit(expcetedInstanceToCollectCount).collect(Collectors.toMap(i -> i.getDiscoveryFQDN(), i -> i));
    List<InstanceMetaData> decommissionedMetadataList = collected.values().stream().limit(expectedInstancesDecommissionedCount).collect(Collectors.toList());
    Set<String> fqdnsDecommissioned = decommissionedMetadataList.stream().map(InstanceMetaData::getDiscoveryFQDN).collect(Collectors.toUnmodifiableSet());
    setupAdditionalMocks(hostGroup, instancesToDecommission, collected, fqdnsDecommissioned);
    Set<Long> instanceIdsToDecommission = instancesToDecommission.stream().map(InstanceMetaData::getPrivateId).collect(Collectors.toUnmodifiableSet());
    Set<String> hostnamesToDecommission = instancesToDecommission.stream().map(InstanceMetaData::getDiscoveryFQDN).collect(Collectors.toUnmodifiableSet());
    StopStartDownscaleDecommissionViaCMRequest request = new StopStartDownscaleDecommissionViaCMRequest(1L, INSTANCE_GROUP_NAME, instanceIdsToDecommission);
    HandlerEvent handlerEvent = new HandlerEvent(Event.wrap(request));
    Selectable selectable = underTest.doAccept(handlerEvent);
    assertThat(selectable).isInstanceOf(StopStartDownscaleDecommissionViaCMResult.class);
    StopStartDownscaleDecommissionViaCMResult result = (StopStartDownscaleDecommissionViaCMResult) selectable;
    assertThat(result.getDecommissionedHostFqdns()).hasSize(expectedInstancesDecommissionedCount);
    assertThat(result.getNotDecommissionedHostFqdns()).hasSize(instancesToDecommissionCount - expectedInstancesDecommissionedCount);
    verifyNoMoreInteractions(instanceMetaDataService);
    verify(clusterDecomissionService).collectHostsToRemove(eq(hostGroup), eq(hostnamesToDecommission));
    verify(clusterDecomissionService).decommissionClusterNodesStopStart(eq(collected), anyLong());
    verifyNoMoreInteractions(flowMessageService);
    verifyNoMoreInteractions(clusterDecomissionService);
}
Also used : ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) Stack(com.sequenceiq.cloudbreak.domain.stack.Stack) Cluster(com.sequenceiq.cloudbreak.domain.stack.cluster.Cluster) BeforeEach(org.junit.jupiter.api.BeforeEach) ClusterDecomissionService(com.sequenceiq.cloudbreak.cluster.api.ClusterDecomissionService) StopStartDownscaleDecommissionViaCMResult(com.sequenceiq.cloudbreak.reactor.api.event.orchestration.StopStartDownscaleDecommissionViaCMResult) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) CLUSTER_SCALING_STOPSTART_DOWNSCALE_ENTEREDCMMAINTMODE(com.sequenceiq.cloudbreak.event.ResourceEvent.CLUSTER_SCALING_STOPSTART_DOWNSCALE_ENTEREDCMMAINTMODE) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) Mock(org.mockito.Mock) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) Selectable(com.sequenceiq.cloudbreak.common.event.Selectable) HostGroupService(com.sequenceiq.cloudbreak.service.hostgroup.HostGroupService) Mockito.lenient(org.mockito.Mockito.lenient) ArrayList(java.util.ArrayList) ClusterApi(com.sequenceiq.cloudbreak.cluster.api.ClusterApi) HashSet(java.util.HashSet) UPDATE_IN_PROGRESS(com.sequenceiq.cloudbreak.api.endpoint.v4.common.Status.UPDATE_IN_PROGRESS) CLUSTER_SCALING_STOPSTART_DOWNSCALE_ENTERINGCMMAINTMODE(com.sequenceiq.cloudbreak.event.ResourceEvent.CLUSTER_SCALING_STOPSTART_DOWNSCALE_ENTERINGCMMAINTMODE) ExtendWith(org.junit.jupiter.api.extension.ExtendWith) Event(reactor.bus.Event) Mockito.verifyNoMoreInteractions(org.mockito.Mockito.verifyNoMoreInteractions) CloudbreakFlowMessageService(com.sequenceiq.cloudbreak.core.flow2.stack.CloudbreakFlowMessageService) Map(java.util.Map) InstanceMetaDataService(com.sequenceiq.cloudbreak.service.stack.InstanceMetaDataService) InjectMocks(org.mockito.InjectMocks) MockitoExtension(org.mockito.junit.jupiter.MockitoExtension) InstanceStatus(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.base.InstanceStatus) Set(java.util.Set) HandlerEvent(com.sequenceiq.flow.reactor.api.handler.HandlerEvent) Mockito.when(org.mockito.Mockito.when) EventStatus(com.sequenceiq.cloudbreak.cloud.event.model.EventStatus) Collectors(java.util.stream.Collectors) Mockito.verify(org.mockito.Mockito.verify) Test(org.junit.jupiter.api.Test) StopStartDownscaleDecommissionViaCMRequest(com.sequenceiq.cloudbreak.reactor.api.event.cluster.StopStartDownscaleDecommissionViaCMRequest) List(java.util.List) HostGroup(com.sequenceiq.cloudbreak.domain.stack.cluster.host.HostGroup) InstanceMetaData(com.sequenceiq.cloudbreak.domain.stack.instance.InstanceMetaData) ClusterApiConnectors(com.sequenceiq.cloudbreak.service.cluster.ClusterApiConnectors) Optional(java.util.Optional) InstanceGroup(com.sequenceiq.cloudbreak.domain.stack.instance.InstanceGroup) StackService(com.sequenceiq.cloudbreak.service.stack.StackService) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) StopStartDownscaleDecommissionViaCMResult(com.sequenceiq.cloudbreak.reactor.api.event.orchestration.StopStartDownscaleDecommissionViaCMResult) HostGroup(com.sequenceiq.cloudbreak.domain.stack.cluster.host.HostGroup) StopStartDownscaleDecommissionViaCMRequest(com.sequenceiq.cloudbreak.reactor.api.event.cluster.StopStartDownscaleDecommissionViaCMRequest) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) InstanceMetaData(com.sequenceiq.cloudbreak.domain.stack.instance.InstanceMetaData) Selectable(com.sequenceiq.cloudbreak.common.event.Selectable) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) HandlerEvent(com.sequenceiq.flow.reactor.api.handler.HandlerEvent) Test(org.junit.jupiter.api.Test)

Aggregations

InstanceMetaData (com.sequenceiq.cloudbreak.domain.stack.instance.InstanceMetaData)415 Stack (com.sequenceiq.cloudbreak.domain.stack.Stack)165 InstanceGroup (com.sequenceiq.cloudbreak.domain.stack.instance.InstanceGroup)152 Test (org.junit.jupiter.api.Test)143 Map (java.util.Map)92 HashSet (java.util.HashSet)90 Set (java.util.Set)86 List (java.util.List)84 HostGroup (com.sequenceiq.cloudbreak.domain.stack.cluster.host.HostGroup)77 Cluster (com.sequenceiq.cloudbreak.domain.stack.cluster.Cluster)73 Collectors (java.util.stream.Collectors)71 ArrayList (java.util.ArrayList)62 Test (org.junit.Test)60 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)57 Optional (java.util.Optional)52 StackService (com.sequenceiq.cloudbreak.service.stack.StackService)48 Inject (javax.inject.Inject)47 Logger (org.slf4j.Logger)47 LoggerFactory (org.slf4j.LoggerFactory)47 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)45