/** As {@link #eventuallyOnNotify(Object, Supplier, Predicate, Duration, boolean)} with default timeout. */ public static <T> void eventuallyOnNotify(Object notifyTarget, Supplier<T> supplier, Predicate<T> predicate) { eventuallyOnNotify(notifyTarget, supplier, predicate, null); }
/** Convenience for {@link #eventuallyOnNotify(Object, Supplier, Predicate, Duration, boolean)} * when the notify target and the value under test are the same. */ public static <T> void eventuallyOnNotify(T object, Predicate<T> predicate, Duration timeout) { eventuallyOnNotify(object, Suppliers.ofInstance(object), predicate, timeout); }
/** As {@link #eventuallyOnNotify(Object, Predicate, Duration)} with the default duration of {@link #eventuallyOnNotify(Object, Supplier, Predicate)}. */ public static <T> void eventuallyOnNotify(T object, Predicate<T> predicate) { eventuallyOnNotify(object, Suppliers.ofInstance(object), predicate, null); }
protected void waitForMessages(Predicate<? super List<String>> predicate, Duration timeout) throws Exception { Asserts.eventuallyOnNotify(messages, predicate, timeout); }
protected void waitForMessage(final String id) { Asserts.eventuallyOnNotify(messages, CollectionFunctionals.contains(id), TIMEOUT); } protected void releaseAndWaitForMonitorableJob(final String id) {
protected void assertSize(int targetSize, int quarantineSize, final int deletedSize) { assertSize(targetSize, quarantineSize); Asserts.eventuallyOnNotify(entitiesRemoved, CollectionFunctionals.sizeEquals(deletedSize)); }