import java.util.List;
import java.util.Map;
+import javax.management.BadBinaryOpValueExpException;
+
import junit.framework.TestCase;
import org.apache.commons.logging.Log;
long begin = System.currentTimeMillis();
long duration = 0;
boolean allBundlesOk = true;
+ StringBuffer badBundles = null;
while (duration < getResolvedTimeout()) {
+ badBundles = new StringBuffer();
for (Bundle bundle : bundleContext.getBundles()) {
if (bundle.getSymbolicName() != null
&& bundle.getSymbolicName().startsWith(
if (bundle.getState() == Bundle.INSTALLED) {
allBundlesOk = false;
- break;// for
+ badBundles
+ .append(OsgiStringUtils
+ .nullSafeSymbolicName(bundle)
+ + " ["
+ + OsgiStringUtils
+ .bundleStateAsString(bundle) + "]");
}
if (bundlesToStart.contains(bundle.getSymbolicName())
&& bundle.getState() != Bundle.ACTIVE) {
allBundlesOk = false;
- break;// for
+ badBundles
+ .append(OsgiStringUtils
+ .nullSafeSymbolicName(bundle)
+ + " ["
+ + OsgiStringUtils
+ .bundleStateAsString(bundle) + "]\n");
}
}
if (!allBundlesOk) {
listInstalledBundles();
- throw new SlcException("Some bundles are in INSTALLED status");
+ throw new SlcException(
+ "Some bundles are not at the proper status:\n" + badBundles);
}
}