X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-it%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Ftest%2Fsal%2Fbinding%2Fit%2FAbstractTest.java;h=9ac94e7b8904a3148128ca0f01f6b7d6a72fa5d0;hp=41b1e310a06e6812d954cee64e7db3c895e8f996;hb=6fd408a04fe4a3611843e2246ece6d7c34b76903;hpb=25a2051acf9b3095b33776bf4e269c7fd5dc678a diff --git a/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/AbstractTest.java b/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/AbstractTest.java index 41b1e310a0..9ac94e7b89 100644 --- a/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/AbstractTest.java +++ b/opendaylight/md-sal/sal-binding-it/src/test/java/org/opendaylight/controller/test/sal/binding/it/AbstractTest.java @@ -1,19 +1,32 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ package org.opendaylight.controller.test.sal.binding.it; -import static org.ops4j.pax.exam.CoreOptions.*; -import static org.opendaylight.controller.test.sal.binding.it.TestHelper.*; - -import javax.inject.Inject; - import org.junit.runner.RunWith; import org.opendaylight.controller.sal.binding.api.BindingAwareBroker; import org.ops4j.pax.exam.Configuration; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; -import org.ops4j.pax.exam.options.DefaultCompositeOption; -import org.ops4j.pax.exam.util.PathUtils; +import org.ops4j.pax.exam.util.Filter; import org.osgi.framework.BundleContext; +import javax.inject.Inject; + +import static org.opendaylight.controller.test.sal.binding.it.TestHelper.baseModelBundles; +import static org.opendaylight.controller.test.sal.binding.it.TestHelper.bindingAwareSalBundles; +import static org.opendaylight.controller.test.sal.binding.it.TestHelper.configMinumumBundles; +import static org.opendaylight.controller.test.sal.binding.it.TestHelper.flowCapableModelBundles; +import static org.opendaylight.controller.test.sal.binding.it.TestHelper.junitAndMockitoBundles; +import static org.opendaylight.controller.test.sal.binding.it.TestHelper.mdSalCoreBundles; +import static org.ops4j.pax.exam.CoreOptions.mavenBundle; +import static org.ops4j.pax.exam.CoreOptions.options; +import static org.ops4j.pax.exam.CoreOptions.systemProperty; + @RunWith(PaxExam.class) public abstract class AbstractTest { @@ -24,6 +37,7 @@ public abstract class AbstractTest { public static final String YANGTOOLS_MODELS = "org.opendaylight.yangtools.model"; @Inject + @Filter(timeout=120*1000) BindingAwareBroker broker; @Inject @@ -49,21 +63,25 @@ public abstract class AbstractTest { public Option[] config() { return options(systemProperty("osgi.console").value("2401"), mavenBundle("org.slf4j", "slf4j-api") .versionAsInProject(), // - systemProperty("logback.configurationFile").value( - "file:" + PathUtils.getBaseDir() - + "/src/test/resources/logback.xml"), +// systemProperty("logback.configurationFile").value( +// "file:" + PathUtils.getBaseDir() +// + "/src/test/resources/logback.xml"), mavenBundle("org.slf4j", "log4j-over-slf4j").versionAsInProject(), // mavenBundle("ch.qos.logback", "logback-core").versionAsInProject(), // mavenBundle("ch.qos.logback", "logback-classic").versionAsInProject(), // + systemProperty("osgi.bundles.defaultStartLevel").value("4"), - configMinumumBundles(), - mdSalCoreBundles(), bindingAwareSalBundles(), - + configMinumumBundles(), // BASE Models - baseModelBundles(), flowCapableModelBundles(), junitAndMockitoBundles()); + baseModelBundles(), + flowCapableModelBundles(), + + // Set fail if unresolved bundle present + systemProperty("pax.exam.osgi.unresolved.fail").value("true"), + junitAndMockitoBundles()); } - + }