use of io.syndesis.qe.Component in project syndesis-qe by syndesisio.
the class CommonSteps method waitForSyndeisis.
@Then("^wait for Syndesis to become ready")
public void waitForSyndeisis() {
EnumSet<Component> components = EnumSet.allOf(Component.class);
ExecutorService executorService = Executors.newFixedThreadPool(10);
components.forEach(c -> {
Runnable runnable = () -> OpenShiftUtils.xtf().waiters().areExactlyNPodsRunning(1, "component", c.getName()).interval(TimeUnit.SECONDS, 20).timeout(TimeUnit.MINUTES, 12).assertEventually();
executorService.submit(runnable);
});
executorService.shutdown();
try {
if (!executorService.awaitTermination(10, TimeUnit.MINUTES)) {
executorService.shutdownNow();
Assertions.fail("Syndesis wasn't initilized in time");
}
} catch (InterruptedException e) {
Assertions.fail("Syndesis wasn't initilized in time");
}
}
Aggregations