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);
31 monitorTimer.schedule(new TimerTask() {
34 boolean failed = false;
35 for(Bundle bundle : bundleContext.getBundles()){
36 if(bundle.getState() != Bundle.ACTIVE && bundle.getState() != Bundle.RESOLVED) {
37 System.out.println("Failed to activate/resolve bundle = " + bundle.getSymbolicName() + " state = " + stateToString(bundle.getState()));
51 public void stop(BundleContext bundleContext) throws Exception {