Search in sources :

Example 1 with DistroxScaleThresholdAssertions

use of com.sequenceiq.it.cloudbreak.assertion.distrox.DistroxScaleThresholdAssertions in project cloudbreak by hortonworks.

the class DistroXResilientScaleTests method testPercentageResilientScaleDistrox.

@Test(dataProvider = TEST_CONTEXT, description = "Resilient Scaling: " + "UseCase4: " + "- Start upscale on running cluster with percentage option with at least option " + "- Provider only gives back above threshold " + "- Upscale should complete ")
@Description(given = "there is a running default Distrox cluster", when = "cluster has been scaled up at least 90% of the required node count", and = "cluster has been scaled up again while removing 10% of the instance from the scaled host group", then = "cluster can be resiliently scaled up at least the required node count threshold")
public void testPercentageResilientScaleDistrox(TestContext testContext, ITestContext iTestContext) {
    DistroXScaleTestParameters params = new DistroXScaleTestParameters(iTestContext.getCurrentXmlTest().getAllParameters());
    testContext.given(DistroXTestDto.class).when(distroXTestClient.scale(params.getHostGroup(), params.getScaleUpTarget(), params.getAdjustmentType(), params.getThreshold())).awaitForFlow().then(new DistroxScaleThresholdAssertions(params.getHostGroup(), params.getScaleUpTarget(), params.getThreshold())).when(distroXTestClient.scale(params.getHostGroup(), params.getScaleDownTarget())).awaitForFlow().when(distroXTestClient.scale(params.getHostGroup(), params.getScaleUpTarget(), params.getAdjustmentType(), params.getThreshold())).then((tc, testDto, client) -> removeInstanceWhileScalingGroup(tc, testDto, client, params)).awaitForFlow().when(distroXTestClient.get()).then(new DistroxScaleThresholdAssertions(params.getHostGroup(), params.getScaleUpTarget(), params.getThreshold())).validate();
}
Also used : DistroXTestDto(com.sequenceiq.it.cloudbreak.dto.distrox.DistroXTestDto) DistroxScaleThresholdAssertions(com.sequenceiq.it.cloudbreak.assertion.distrox.DistroxScaleThresholdAssertions) Description(com.sequenceiq.it.cloudbreak.context.Description) Test(org.testng.annotations.Test) AbstractE2ETest(com.sequenceiq.it.cloudbreak.testcase.e2e.AbstractE2ETest)

Aggregations

DistroxScaleThresholdAssertions (com.sequenceiq.it.cloudbreak.assertion.distrox.DistroxScaleThresholdAssertions)1 Description (com.sequenceiq.it.cloudbreak.context.Description)1 DistroXTestDto (com.sequenceiq.it.cloudbreak.dto.distrox.DistroXTestDto)1 AbstractE2ETest (com.sequenceiq.it.cloudbreak.testcase.e2e.AbstractE2ETest)1 Test (org.testng.annotations.Test)1