Search in sources :

Example 1 with CamelK

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();
}
Also used : SelenideElement(com.codeborne.selenide.SelenideElement) CamelK(io.syndesis.qe.resource.impl.CamelK) Then(io.cucumber.java.en.Then)

Aggregations

SelenideElement (com.codeborne.selenide.SelenideElement)1 Then (io.cucumber.java.en.Then)1 CamelK (io.syndesis.qe.resource.impl.CamelK)1