Fixed TopologyIT to use @Inject 99/2199/2
authorEd Warnicke <eaw@cisco.com>
Sun, 27 Oct 2013 23:24:13 +0000 (18:24 -0500)
committerGerrit Code Review <gerrit@opendaylight.org>
Tue, 29 Oct 2013 00:00:18 +0000 (00:00 +0000)
Change-Id: I88aba402ab1b02fe32dc56aca101b42ae4c2a628
Signed-off-by: Ed Warnicke <eaw@cisco.com>
opendaylight/topologymanager/integrationtest/src/test/java/org/opendaylight/controller/topologymanager/TopologyManagerIT.java

index 296be72a131c078a98cb725541af6f7bdc7e2875..7c70342b5c17ede8cb655eb998ed3bb97ebd54b1 100644 (file)
@@ -39,7 +39,7 @@ public class TopologyManagerIT {
     // get the OSGI bundle context
     @Inject
     private BundleContext bc;
     // get the OSGI bundle context
     @Inject
     private BundleContext bc;
-
+    @Inject
     private ITopologyManager manager = null;
 
     // Configure the OSGi container
     private ITopologyManager manager = null;
 
     // Configure the OSGi container
@@ -132,38 +132,6 @@ public class TopologyManagerIT {
         }
     }
 
         }
     }
 
-    @Before
-    public void areWeReady() {
-        assertNotNull(bc);
-        boolean debugit = false;
-        Bundle b[] = bc.getBundles();
-        for (int i = 0; i < b.length; i++) {
-            int state = b[i].getState();
-            if (state != Bundle.ACTIVE && state != Bundle.RESOLVED) {
-                log.debug("Bundle:" + b[i].getSymbolicName() + " state:"
-                        + stateToString(state));
-                debugit = true;
-            }
-        }
-        if (debugit) {
-            log.debug("Do some debugging because some bundle is "
-                    + "unresolved");
-        }
-
-        // Assert if true, if false we are good to go!
-        assertFalse(debugit);
-
-        ServiceReference r = bc.getServiceReference(ITopologyManager.class
-                .getName());
-        if (r != null) {
-            this.manager = (ITopologyManager) bc.getService(r);
-        }
-        // If StatisticsManager is null, cannot run tests.
-        assertNotNull(this.manager);
-
-    }
-
-
     /**
      *  This test verifies that the isInternal method of the TopologyManager returns true when a node is internal and
      *  not otherwise
     /**
      *  This test verifies that the isInternal method of the TopologyManager returns true when a node is internal and
      *  not otherwise