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;
* Exercise inventory listener ({@link OpendaylightInventoryListener#onNodeUpdated(NodeUpdated)})
*/
@RunWith(PaxExam.class)
+@ExamReactorStrategy(PerClass.class)
public class SalIntegrationTest {
static final Logger LOG = LoggerFactory.getLogger(SalIntegrationTest.class);
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;
/**
static long getFailSafeTimeout() {
return 30000;
}
-
+
/**
* test setup
* @throws InterruptedException
public void tearDown() {
SimulatorAssistant.waitForSwitchSimulatorOn(switchSim);
SimulatorAssistant.tearDownSwitchSimulatorAfterScenario(switchSim, scenarioPool, getFailSafeTimeout());
-
+
if (finalCheck != null) {
LOG.info("starting final check");
finalCheck.run();
};
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);
*/
@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 {