use of com.sequenceiq.cloudbreak.polling.AbsolutTimeBasedTimeoutChecker in project cloudbreak by hortonworks.
the class FreeIpaUpgradeTests method testHAFreeIpaInstanceUpgrade.
@Test(dataProvider = TEST_CONTEXT)
@Description(given = "there is a running cloudbreak", when = "a valid stack create request is sent with 3 FreeIPA instances " + "AND the stack is upgraded one node at a time", then = "the stack should be available AND deletable")
public void testHAFreeIpaInstanceUpgrade(TestContext testContext) {
String freeIpa = resourcePropertyProvider().getName();
SdxDatabaseRequest sdxDatabaseRequest = new SdxDatabaseRequest();
sdxDatabaseRequest.setAvailabilityType(SdxDatabaseAvailabilityType.NONE);
sdxDatabaseRequest.setCreate(false);
testContext.given("telemetry", TelemetryTestDto.class).withLogging().withReportClusterLogs().given(freeIpa, FreeIpaTestDto.class).withFreeIpaHa(1, 3).withTelemetry("telemetry").withUpgradeCatalogAndImage().when(freeIpaTestClient.create(), key(freeIpa)).await(FREEIPA_AVAILABLE).given(SdxTestDto.class).withCloudStorage().withExternalDatabase(sdxDatabaseRequest).when(sdxTestClient.create()).await(SdxClusterStatusResponse.RUNNING).given(freeIpa, FreeIpaTestDto.class).when(freeIpaTestClient.upgrade()).await(Status.UPDATE_IN_PROGRESS, waitForFlow().withWaitForFlow(Boolean.FALSE)).given(FreeIpaOperationStatusTestDto.class).withOperationId(((FreeIpaTestDto) testContext.get(freeIpa)).getOperationId()).then((tc, testDto, freeIpaClient) -> testFreeIpaAvailabilityDuringUpgrade(tc, testDto, freeIpaClient, freeIpa)).await(COMPLETED, waitForFlow().withWaitForFlow(Boolean.FALSE).withTimeoutChecker(new AbsolutTimeBasedTimeoutChecker(TWO_HOURS_IN_SEC))).given(freeIpa, FreeIpaTestDto.class).await(FREEIPA_AVAILABLE, waitForFlow().withWaitForFlow(Boolean.FALSE)).then((tc, testDto, client) -> freeIpaTestClient.delete().action(tc, testDto, client)).await(FREEIPA_DELETE_COMPLETED, waitForFlow().withWaitForFlow(Boolean.FALSE)).validate();
}
Aggregations