import java.util.concurrent.TimeUnit;
import java.util.function.BiConsumer;
-import org.apache.karaf.bundle.core.BundleService;
import org.awaitility.Awaitility;
import org.awaitility.core.ConditionTimeoutException;
import org.opendaylight.odlparent.bundles.diag.DiagProvider;
-import org.opendaylight.odlparent.bundles.diag.ri.DefaultDiagProvider;
-import org.osgi.framework.BundleContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
this.diagProvider = requireNonNull(diagProvider);
}
- @Deprecated(forRemoval = true)
- public TestBundleDiag(final BundleContext bundleContext, final BundleService bundleService) {
- this(new DefaultDiagProvider(bundleService, bundleContext));
- }
-
/**
* Does something similar to Karaf's "diag" CLI command, and throws a {@link SystemStateFailureException} if
* anything including bundle wiring is not OK.
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>${project.groupId}</groupId>
+ <groupId>org.opendaylight.odlparent</groupId>
+ <artifactId>bundles-diag</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.odlparent</groupId>
<artifactId>bundles4-test</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.opendaylight.odlparent.bundles.diag.ri.DefaultDiagProvider;
import org.opendaylight.odlparent.bundlestest.lib.TestBundleDiag;
import org.ops4j.pax.exam.Configuration;
import org.ops4j.pax.exam.Option;
if (!Boolean.getBoolean(BUNDLES_DIAG_SKIP_PROP)) {
LOG.info("new TestBundleDiag().checkBundleDiagInfos() STARTING");
Integer timeOutInSeconds = Integer.getInteger(BUNDLES_DIAG_TIMEOUT_PROP, 5 * 60);
- new TestBundleDiag(bundleContext, bundleService).checkBundleDiagInfos(timeOutInSeconds, SECONDS);
+ new TestBundleDiag(new DefaultDiagProvider(bundleService, bundleContext))
+ .checkBundleDiagInfos(timeOutInSeconds, SECONDS);
LOG.info("new TestBundleDiag().checkBundleDiagInfos() ENDED");
} else {
LOG.warn("SKIPPING TestBundleDiag because system property {} is true: {}", BUNDLES_DIAG_SKIP_PROP,