public void waitBundleStarted()

in src/main/java/org/apache/sling/testing/clients/osgi/OsgiConsoleClient.java [694:716]


    public void waitBundleStarted(final String symbolicName, final long timeout, final long delay)
            throws TimeoutException, InterruptedException {

        Polling p = new Polling() {
            @Override
            public Boolean call() throws Exception {
                try {
                    BundleInfo bundleInfo = getBundleInfo(symbolicName, 200);
                    return (bundleInfo.getStatus() == Bundle.Status.ACTIVE);
                } catch (ClientException e) {
                    LOG.debug("Could not get bundle state for {}: {}", symbolicName, e.getLocalizedMessage(), e);
                    return false;
                }
            }

            @Override
            protected String message() {
                return "Bundle " + symbolicName + " did not start in %1$d ms";
            }
        };

        p.poll(timeout, delay);
    }