use of io.syndesis.qe.resource.impl.CamelK in project syndesis-qe by syndesisio.
the class IntegrationSteps method waitForIntegrationState.
/*
* State != starting state
* State is state of integration. e.g. "Running", "Stopped"
*/
@Then("^wait until integration \"([^\"]*)\" gets into \"([^\"]*)\" state$")
public void waitForIntegrationState(String integrationName, String integrationStatus) {
commonSteps.navigateTo("Integrations");
SelenideElement integration = integrations.getIntegration(integrationName);
TestUtils.sleepForJenkinsDelayIfHigher(10);
if ("camelk".equalsIgnoreCase(TestConfiguration.syndesisRuntime())) {
ResourceFactory.get(CamelK.class).waitForContextToBuild(integrationName);
Selenide.refresh();
log.info("Integration platform status: {}", OpenShiftUtils.binary().execute("get", "integrationplatforms", "-o yaml"));
}
assertThat(TestUtils.waitForEvent(status -> status.contains(integrationStatus), () -> integrations.getIntegrationItemStatus(integrationName), TimeUnit.MINUTES, 10, TimeUnit.SECONDS, 20)).isTrue();
}
Aggregations