BUG-837: it unstable (added missing bundles)
[openflowplugin.git] / openflowplugin-it / src / test / java / org / opendaylight / openflowplugin / openflow / md / it / SalIntegrationTest.java
index 07442c3cad97644d8c8e5a98f993d5d5c93f1db1..f7483aa3b2c834885b61dd3848da729c3b81e572 100644 (file)
@@ -40,6 +40,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.Openday
 import org.ops4j.pax.exam.Configuration;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
+import org.ops4j.pax.exam.spi.reactors.PerClass;
 import org.ops4j.pax.exam.util.Filter;
 import org.osgi.framework.BundleContext;
 import org.slf4j.Logger;
@@ -49,6 +51,7 @@ import org.slf4j.LoggerFactory;
  * Exercise inventory listener ({@link OpendaylightInventoryListener#onNodeUpdated(NodeUpdated)})
  */
 @RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
 public class SalIntegrationTest {
 
     static final Logger LOG = LoggerFactory.getLogger(SalIntegrationTest.class);
@@ -57,15 +60,14 @@ public class SalIntegrationTest {
     private ThreadPoolLoggingExecutor scenarioPool;
     private SimpleClient switchSim;
     private Runnable finalCheck;
-    
-    @Inject
+
+    @Inject @Filter(timeout=60*000)
     BundleContext ctx;
 
-    @Inject
+    @Inject @Filter(timeout=60*1000)
     BindingAwareBroker broker;
-    
-    @Inject 
-    @Filter(timeout=20*1000)
+
+    @Inject @Filter(timeout=60*1000)
     OpenflowPluginProvider openflowPluginProvider;
 
     /**
@@ -74,7 +76,7 @@ public class SalIntegrationTest {
     static long getFailSafeTimeout() {
         return 30000;
     }
-    
+
     /**
      * test setup
      * @throws InterruptedException
@@ -92,7 +94,7 @@ public class SalIntegrationTest {
     public void tearDown() {
         SimulatorAssistant.waitForSwitchSimulatorOn(switchSim);
         SimulatorAssistant.tearDownSwitchSimulatorAfterScenario(switchSim, scenarioPool, getFailSafeTimeout());
-        
+
         if (finalCheck != null) {
             LOG.info("starting final check");
             finalCheck.run();
@@ -117,13 +119,13 @@ public class SalIntegrationTest {
         };
         ConsumerContext consumerReg = broker.registerConsumer(openflowConsumer, ctx);
         assertNotNull(consumerReg);
-        
+
         LOG.debug("handshake integration test");
         LOG.debug("openflowPluginProvider: " + openflowPluginProvider);
 
         switchSim.setSecuredClient(false);
         ScenarioHandler scenario = new ScenarioHandler(ScenarioFactory.createHandshakeScenarioVBM(
-                ScenarioFactory.VERSION_BITMAP_13, (short) 0, ScenarioFactory.VERSION_BITMAP_10_13));
+                ScenarioFactory.VERSION_BITMAP_13, (short) 0, ScenarioFactory.VERSION_BITMAP_10_13, true));
         switchSim.setScenarioHandler(scenario);
         scenarioPool.execute(switchSim);
 
@@ -141,18 +143,14 @@ public class SalIntegrationTest {
      */
     @Configuration
     public Option[] config() {
-        return options(systemProperty("osgi.console").value("2401"),
+        return options(
+                systemProperty("osgi.console").value("2401"),
+                systemProperty("osgi.bundles.defaultStartLevel").value("4"),
+                systemProperty("pax.exam.osgi.unresolved.fail").value("true"),
+
                 OFPaxOptionsAssistant.osgiConsoleBundles(),
                 OFPaxOptionsAssistant.loggingBudles(),
-                
-                TestHelper.junitAndMockitoBundles(),
-                TestHelper.mdSalCoreBundles(), 
-                TestHelper.configMinumumBundles(),
-                TestHelper.baseModelBundles(),
-                TestHelper.flowCapableModelBundles(), 
-                OFPaxOptionsAssistant.ofLibraryBundles(),
-                OFPaxOptionsAssistant.ofPluginBundles()
-                );
+                OFPaxOptionsAssistant.ofPluginBundles());
     }
 
     private static class TestInventoryListener implements OpendaylightInventoryListener {