X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fdistribution%2Fsanitytest%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsanitytest%2Finternal%2FActivator.java;h=60db1b31e6d1581060cfd929d66082017c35ca39;hp=d92277269a01f2f8fc3eac7df8af6d78f212bf22;hb=f3bb0de0240648e0c4ddf73a304a5ef65bd1df29;hpb=98a87e05e8658955e697525434f028c34bdfa877 diff --git a/opendaylight/distribution/sanitytest/src/main/java/org/opendaylight/controller/sanitytest/internal/Activator.java b/opendaylight/distribution/sanitytest/src/main/java/org/opendaylight/controller/sanitytest/internal/Activator.java index d92277269a..60db1b31e6 100644 --- a/opendaylight/distribution/sanitytest/src/main/java/org/opendaylight/controller/sanitytest/internal/Activator.java +++ b/opendaylight/distribution/sanitytest/src/main/java/org/opendaylight/controller/sanitytest/internal/Activator.java @@ -1,3 +1,10 @@ +/* + * 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.sanitytest.internal; import java.util.Timer; @@ -12,6 +19,7 @@ public class Activator implements BundleActivator { //10 Second initial, 1 second subsequent private static final int INITIAL_DELAY = 10000; private static final int SUBSEQUENT_DELAY = 1000; + private static final int MAX_ATTEMPTS = 120; private String stateToString(int state) { @@ -66,12 +74,13 @@ public class Activator implements BundleActivator { } if (!resolved) { countup++; - if (countup < 60) { + if (countup < MAX_ATTEMPTS) { System.out.println("all bundles haven't finished starting, will repeat"); try { Thread.sleep(SUBSEQUENT_DELAY); } catch (Exception e) { - ; + System.out.println("Thread.sleep interuptted."); + break; } } else resolved = true;