in src/testJobs/java/org/apache/sdap/ningester/testjobs/TestUtils.java [26:37]
public static <T> void assertEqualsEventually(T expected, Supplier<T> actualSupplier, int secondsToWait) throws InterruptedException {
int n = 0;
int iterations = 10 * secondsToWait;
int sleepTimeMillis = 100;
T suppliedValue = actualSupplier.get();
while (!suppliedValue.equals(expected) && n++ < iterations) {
Thread.sleep(sleepTimeMillis);
suppliedValue = actualSupplier.get();
}
assertThat("Did not equal after waiting " + (iterations * sleepTimeMillis / 1000) + " seconds.", suppliedValue, is(expected));
}