X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fbinding%2Fimpl%2Ftest%2FBackwardsCompatibleNotificationBrokerTest.java;fp=opendaylight%2Fmd-sal%2Fsal-binding-broker%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fbinding%2Fimpl%2Ftest%2FBackwardsCompatibleNotificationBrokerTest.java;h=f43352d1018e3345dbbd7188d5fb4947b7bb630a;hb=a07faa892e0b0b471a271156845ed9b980fa2269;hp=6a8dc5fde960400ea07aa68e44b0a23375d6df30;hpb=abf88e6a9973fe2f0e2c59af9b6543359772ced5;p=controller.git diff --git a/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/BackwardsCompatibleNotificationBrokerTest.java b/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/BackwardsCompatibleNotificationBrokerTest.java index 6a8dc5fde9..f43352d101 100644 --- a/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/BackwardsCompatibleNotificationBrokerTest.java +++ b/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/impl/test/BackwardsCompatibleNotificationBrokerTest.java @@ -10,6 +10,7 @@ package org.opendaylight.controller.md.sal.binding.impl.test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import java.util.concurrent.TimeUnit; import org.opendaylight.controller.md.sal.binding.compat.HeliumNotificationProviderServiceAdapter; import com.google.common.collect.ImmutableList; @@ -52,17 +53,23 @@ public class BackwardsCompatibleNotificationBrokerTest extends AbstractNotificat final CountDownLatch latch = new CountDownLatch(1); final TwoLevelListChanged testData = createTestData(); - final NotifTestListener testNotifListener = new NotifTestListener(latch); + final NotifTestListenerChild testNotifListener = new NotifTestListenerChild(latch); final ListenerRegistration listenerRegistration = notificationProviderService.registerNotificationListener(testNotifListener); notificationProviderService.publish(testData); - latch.await(); + latch.await(500L, TimeUnit.MILLISECONDS); assertTrue(testNotifListener.getReceivedNotifications().size() == 1); assertEquals(testData, testNotifListener.getReceivedNotifications().get(0)); listenerRegistration.close(); } + private static class NotifTestListenerChild extends NotifTestListener { + + public NotifTestListenerChild(final CountDownLatch latch) { + super(latch); + } + } private static class NotifTestListener implements OpendaylightMdsalListTestListener { private List receivedNotifications = new ArrayList<>(); private CountDownLatch latch;