X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Feos-dom-akka%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Feos%2Fakka%2FAbstractNativeEosTest.java;h=5af0e2afdbffffa48aea202e4b2827ae998db2f0;hp=576a9c1d12f07a1a765118ddcebf4cd3a09e507b;hb=3a526427c93dc44700ca476e57f0cea6eadfb2a7;hpb=0fbd72c0ceb5e3d143f3eafc70d12fc13ea9050d diff --git a/opendaylight/md-sal/eos-dom-akka/src/test/java/org/opendaylight/controller/eos/akka/AbstractNativeEosTest.java b/opendaylight/md-sal/eos-dom-akka/src/test/java/org/opendaylight/controller/eos/akka/AbstractNativeEosTest.java index 576a9c1d12..5af0e2afdb 100644 --- a/opendaylight/md-sal/eos-dom-akka/src/test/java/org/opendaylight/controller/eos/akka/AbstractNativeEosTest.java +++ b/opendaylight/md-sal/eos-dom-akka/src/test/java/org/opendaylight/controller/eos/akka/AbstractNativeEosTest.java @@ -288,7 +288,17 @@ public abstract class AbstractNativeEosTest { } protected static void verifyNoNotifications(final MockEntityOwnershipListener listener) { - await().pollDelay(2, TimeUnit.SECONDS).until(() -> listener.getChanges().isEmpty()); + verifyNoNotifications(listener, 2); + } + + protected static void verifyNoNotifications(final MockEntityOwnershipListener listener, long delaySeconds) { + await().pollDelay(delaySeconds, TimeUnit.SECONDS).until(() -> listener.getChanges().isEmpty()); + } + + protected static void verifyNoAdditionalNotifications( + final MockEntityOwnershipListener listener, long delaySeconds) { + listener.resetListener(); + verifyNoNotifications(listener, delaySeconds); } protected static final class ClusterNode { @@ -367,6 +377,10 @@ public abstract class AbstractNativeEosTest { public List getChanges() { return changes; } + + public void resetListener() { + changes.clear(); + } } protected static final class MockNativeEntityOwnershipService extends AkkaEntityOwnershipService {