Search in sources :

Example 1 with UpgradeCcmHealthCheckRequest

use of com.sequenceiq.cloudbreak.reactor.api.event.cluster.upgrade.ccm.UpgradeCcmHealthCheckRequest in project cloudbreak by hortonworks.

the class HealthCheckHandlerTest method doAccept.

@Test
void doAccept() {
    UpgradeCcmHealthCheckRequest request = new UpgradeCcmHealthCheckRequest(STACK_ID, CLUSTER_ID, Tunnel.CCM);
    when(event.getData()).thenReturn(request);
    Selectable result = underTest.doAccept(event);
    verify(upgradeCcmService).healthCheck(STACK_ID);
    assertThat(result.selector()).isEqualTo("UPGRADECCMHEALTHCHECKRESULT");
}
Also used : Selectable(com.sequenceiq.cloudbreak.common.event.Selectable) UpgradeCcmHealthCheckRequest(com.sequenceiq.cloudbreak.reactor.api.event.cluster.upgrade.ccm.UpgradeCcmHealthCheckRequest) Test(org.junit.jupiter.api.Test)

Example 2 with UpgradeCcmHealthCheckRequest

use of com.sequenceiq.cloudbreak.reactor.api.event.cluster.upgrade.ccm.UpgradeCcmHealthCheckRequest in project cloudbreak by hortonworks.

the class HealthCheckHandler method doAccept.

@Override
public Selectable doAccept(HandlerEvent<UpgradeCcmHealthCheckRequest> event) {
    UpgradeCcmHealthCheckRequest request = event.getData();
    Long stackId = request.getResourceId();
    LOGGER.info("Health check for CCM upgrade...");
    upgradeCcmService.healthCheck(stackId);
    return new UpgradeCcmHealthCheckResult(stackId, request.getClusterId(), request.getOldTunnel());
}
Also used : UpgradeCcmHealthCheckResult(com.sequenceiq.cloudbreak.reactor.api.event.cluster.upgrade.ccm.UpgradeCcmHealthCheckResult) UpgradeCcmHealthCheckRequest(com.sequenceiq.cloudbreak.reactor.api.event.cluster.upgrade.ccm.UpgradeCcmHealthCheckRequest)

Aggregations

UpgradeCcmHealthCheckRequest (com.sequenceiq.cloudbreak.reactor.api.event.cluster.upgrade.ccm.UpgradeCcmHealthCheckRequest)2 Selectable (com.sequenceiq.cloudbreak.common.event.Selectable)1 UpgradeCcmHealthCheckResult (com.sequenceiq.cloudbreak.reactor.api.event.cluster.upgrade.ccm.UpgradeCcmHealthCheckResult)1 Test (org.junit.jupiter.api.Test)1