From 65adf7855146f1e13ff9cf52da4f41df041c47f6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20de=20Talhou=C3=ABt?= Date: Thu, 23 Jun 2016 11:24:52 -0400 Subject: [PATCH 1/1] Inject BindingAwareBroker as it is now provided by OSGi MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Since the wiring is done via blueprint, BindingAwareBroker is not registered using blueprint, thus it is no longer provided by CSS. Change-Id: I87c4d21d51b243b9d9dcd4178556a98390ebc6ec Signed-off-by: Alexis de Talhouët --- .../controller/mdsal/it/base/AbstractMdsalTestBase.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/opendaylight/md-sal/mdsal-it-base/src/main/java/org/opendaylight/controller/mdsal/it/base/AbstractMdsalTestBase.java b/opendaylight/md-sal/mdsal-it-base/src/main/java/org/opendaylight/controller/mdsal/it/base/AbstractMdsalTestBase.java index 843cfced1f..ef4ab1ace9 100644 --- a/opendaylight/md-sal/mdsal-it-base/src/main/java/org/opendaylight/controller/mdsal/it/base/AbstractMdsalTestBase.java +++ b/opendaylight/md-sal/mdsal-it-base/src/main/java/org/opendaylight/controller/mdsal/it/base/AbstractMdsalTestBase.java @@ -22,7 +22,6 @@ import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.karaf.options.LogLevelOption.LogLevel; import org.ops4j.pax.exam.util.Filter; import org.osgi.framework.BundleContext; -import org.osgi.framework.ServiceReference; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -32,6 +31,8 @@ public abstract class AbstractMdsalTestBase extends AbstractConfigTestBase imple private static final int REGISTRATION_TIMEOUT = 70000; @Inject @Filter(timeout=60000) private BundleContext context; + @Inject @Filter(timeout=60000) + private BindingAwareBroker broker; private ProviderContext session = null; public ProviderContext getSession() { @@ -49,11 +50,6 @@ public abstract class AbstractMdsalTestBase extends AbstractConfigTestBase imple public void setup() throws Exception { super.setup(); long start = System.nanoTime(); - ServiceReference serviceReference = context.getServiceReference(BindingAwareBroker.class); - if(serviceReference == null) { - throw new RuntimeException("BindingAwareBroker not found"); - } - BindingAwareBroker broker = context.getService(serviceReference); broker.registerProvider(this); for(int i=0;i