</properties>
<dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>library-karaf</artifactId>
+ <version>${project.version}</version>
+ <type>zip</type>
+ </dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>library-features</artifactId>
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicBoolean;
import org.opendaylight.controller.mdsal.it.base.AbstractMdsalTestBase;
-import org.opendaylight.controller.sal.binding.api.BindingAwareBroker;
import org.opendaylight.ovsdb.lib.MonitorCallBack;
import org.opendaylight.ovsdb.lib.OvsdbClient;
import org.opendaylight.ovsdb.lib.message.MonitorRequest;
return option;
}
- protected BindingAwareBroker.ProviderContext getProviderContext() {
- BindingAwareBroker.ProviderContext providerContext = null;
- for (int i = 0; i < 60; i++) {
- LOG.info("Looking for ProviderContext, try {}", i);
- providerContext = getSession();
- if (providerContext != null) {
- break;
- } else {
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- LOG.warn("Interrupted while waiting for provider context", e);
- }
- }
- }
- assertNotNull("providercontext should not be null", providerContext);
- /* One more second to let the provider finish initialization */
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- LOG.warn("Interrupted while waiting for other provider", e);
- }
- return providerContext;
- }
-
public boolean checkSchema(String schemaStr)
throws IOException, InterruptedException, ExecutionException, TimeoutException {
if (schemaSupported) {
super.setup();
- assertNotNull("ProviderContext was not found", getProviderContext());
if (schema.equals(LibraryIntegrationTestUtils.OPEN_VSWITCH)) {
assertTrue(schema + " is required.", checkSchema(schema));
} else {
super.setup();
- assertNotNull("ProviderContext was not found", getProviderContext());
setSetup(true);
}
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
-import org.opendaylight.controller.sal.binding.api.BindingAwareProvider;
import org.opendaylight.ovsdb.lib.OvsdbClient;
import org.opendaylight.ovsdb.lib.OvsdbConnection;
import org.opendaylight.ovsdb.lib.OvsdbConnectionListener;
// Nothing to do
}
- public static OvsdbClient getTestConnection(BindingAwareProvider provider) throws IOException,
+ public static OvsdbClient getTestConnection(Object provider) throws IOException,
InterruptedException, ExecutionException, TimeoutException {
Properties props = System.getProperties();
String addressStr = props.getProperty(SERVER_IPADDRESS);