X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=bundles-test%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fodlparent%2Fbundlestest%2FTestBundleDiag.java;fp=bundles-test%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fodlparent%2Fbundlestest%2FTestBundleDiag.java;h=4d72552febc8c65a2b2ec5fd2be496fab7008f78;hb=863bf4b167d899f1e681c46d2c0e2e7cd2311393;hp=1c1c92c7007aafa9283492e237392965d093ca03;hpb=3f1ce501fb22aa44b9a60c64007e2815c1361653;p=odlparent.git diff --git a/bundles-test/src/main/java/org/opendaylight/odlparent/bundlestest/TestBundleDiag.java b/bundles-test/src/main/java/org/opendaylight/odlparent/bundlestest/TestBundleDiag.java index 1c1c92c70..4d72552fe 100644 --- a/bundles-test/src/main/java/org/opendaylight/odlparent/bundlestest/TestBundleDiag.java +++ b/bundles-test/src/main/java/org/opendaylight/odlparent/bundlestest/TestBundleDiag.java @@ -8,9 +8,10 @@ package org.opendaylight.odlparent.bundlestest; import static java.util.concurrent.TimeUnit.MILLISECONDS; -import static java.util.concurrent.TimeUnit.MINUTES; +import static java.util.concurrent.TimeUnit.SECONDS; import static org.junit.Assert.fail; +import java.util.concurrent.TimeUnit; import org.apache.karaf.bundle.core.BundleService; import org.awaitility.Awaitility; import org.awaitility.core.ConditionTimeoutException; @@ -47,16 +48,16 @@ public class TestBundleDiag { * * @author Michael Vorburger, based on guidance from Christian Schneider */ - public void checkBundleDiagInfos() { + public void checkBundleDiagInfos(long timeout, TimeUnit timeoutUnit) { try { Awaitility.await("checkBundleDiagInfos") .pollDelay(0, MILLISECONDS) - .pollInterval(250, MILLISECONDS) - .atMost(5, MINUTES) + .pollInterval(1, SECONDS) + .atMost(timeout, timeoutUnit) .conditionEvaluationListener( - condition -> LOG.info("{} (elapsed time {}ms, remaining time {}ms)", + condition -> LOG.info("{} (elapsed time {}s, remaining time {}s)", ((BundleDiagInfos) condition.getValue()).getSummaryText(), - condition.getElapsedTimeInMS(), condition.getRemainingTimeInMS())) + condition.getElapsedTimeInMS() / 1000, condition.getRemainingTimeInMS() / 1000 )) .until(() -> getBundleDiagInfos(), new BundleServiceSummaryMatcher()); // If we're here then either BundleServiceSummaryMatcher quit because of Active, Failure or Stopping..