in src/main/java/org/apache/sling/launchpad/webapp/integrationtest/installer/InstallManyBundlesTest.java [119:138]
private boolean waitNoBundles(String bsn) throws IOException {
final String consoleUrl = HttpTest.HTTP_BASE_URL + "/system/console/bundles/" + bsn + ".json";
final long timeoutMsec = TimeoutsProvider.getInstance().getTimeout(WAIT_ACTIVE_TIMEOUT_MSEC);
final long endTime = System.currentTimeMillis() + timeoutMsec;
while(System.currentTimeMillis() < endTime) {
try {
H.getContent(consoleUrl, HttpTest.CONTENT_TYPE_DONTCARE, null, HttpServletResponse.SC_NOT_FOUND );
return true;
} catch(AssertionFailedError dontCare) {
// Thrown by getContent - might happen if the bundle is still installed
}
try {
Thread.sleep(100);
} catch(InterruptedException ignore) {
}
}
return false;
}