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