+ protected void verifyEntityCandidate(String entityType, YangInstanceIdentifier entityId, String candidateName,
+ Function<YangInstanceIdentifier,NormalizedNode<?,?>> reader, boolean expectPresent) {
+ AssertionError lastError = null;
+ Stopwatch sw = Stopwatch.createStarted();
+ while(sw.elapsed(TimeUnit.MILLISECONDS) <= 5000) {
+ NormalizedNode<?, ?> node = reader.apply(ENTITY_OWNERS_PATH);
+ try {
+ verifyEntityCandidate(node, entityType, entityId, candidateName, expectPresent);
+ return;
+ } catch (AssertionError e) {
+ lastError = e;
+ Uninterruptibles.sleepUninterruptibly(100, TimeUnit.MILLISECONDS);
+ }
+ }
+
+ throw lastError;
+ }
+
+ protected void verifyEntityCandidate(String entityType, YangInstanceIdentifier entityId, String candidateName,
+ Function<YangInstanceIdentifier,NormalizedNode<?,?>> reader) {
+ verifyEntityCandidate(entityType, entityId, candidateName, reader, true);
+ }
+