1 package org.opendaylight.controller.sanitytest.internal;
3 import org.osgi.framework.*;
5 import java.util.Timer;
6 import java.util.TimerTask;
8 public class Activator implements BundleActivator {
10 private static final int DELAY = 30000;
13 private String stateToString(int state) {
17 case Bundle.INSTALLED:
21 case Bundle.UNINSTALLED:
24 return "Not CONVERTED";
28 public void start(final BundleContext bundleContext) throws Exception {
29 Timer monitorTimer = new Timer("monitor timer", true);
30 monitorTimer.schedule(new TimerTask() {
33 boolean failed = false;
34 for(Bundle bundle : bundleContext.getBundles()){
35 if(bundle.getState() != Bundle.ACTIVE && bundle.getState() != Bundle.RESOLVED) {
36 System.out.println("------ Failed to activate/resolve bundle = " + bundle.getSymbolicName() + " state = " + stateToString(bundle.getState()));
50 public void stop(BundleContext bundleContext) throws Exception {