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");
}
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());
}
Aggregations