Tune eos gossip/notification intervals
[controller.git] / opendaylight / md-sal / eos-dom-akka / src / test / java / org / opendaylight / controller / eos / akka / AbstractNativeEosTest.java
index 576a9c1..5af0e2a 100644 (file)
@@ -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<DOMEntityOwnershipChange> getChanges() {
             return changes;
         }
+
+        public void resetListener() {
+            changes.clear();
+        }
     }
 
     protected static final class MockNativeEntityOwnershipService extends AkkaEntityOwnershipService {