BUG-7386 Remove blocking gracefulshutdown
[bgpcep.git] / bgp / rib-impl / src / test / java / org / opendaylight / protocol / bgp / rib / impl / CheckUtil.java
index 7a3d5bf4edbc17c6b6d1f20b4898a7bee8f7e50f..6d0e3697dbccb6c6495878fd15e4bf6d8304e3bf 100644 (file)
@@ -27,9 +27,9 @@ public final class CheckUtil {
     private static final int LATCH_TIMEOUT = 10;
     private static final int SLEEP_FOR = 20;
     private static final int SLEEP_UNINTERRUPTIBLY = 50;
-    public static void checkReceivedMessages(final SimpleSessionListener listener, final int numberOfMessages)
+    static void checkReceivedMessages(final SimpleSessionListener listener, final int numberOfMessages)
         throws ReadFailedException {
-        Stopwatch sw = Stopwatch.createStarted();
+        final Stopwatch sw = Stopwatch.createStarted();
         while (sw.elapsed(TimeUnit.SECONDS) <= TIMEOUT) {
             if (listener.getListMsg().size() != numberOfMessages) {
                 Uninterruptibles.sleepUninterruptibly(SLEEP_UNINTERRUPTIBLY, TimeUnit.MILLISECONDS);
@@ -40,7 +40,8 @@ public final class CheckUtil {
         Assert.fail();
     }
 
-    public static <R, T extends DataObject> R readData(final DataBroker dataBroker, final InstanceIdentifier<T> iid, final Function<T, R> function)
+    public static <R, T extends DataObject> R readData(final DataBroker dataBroker, final InstanceIdentifier<T> iid,
+        final Function<T, R> function)
         throws ReadFailedException {
         AssertionError lastError = null;
         final Stopwatch sw = Stopwatch.createStarted();