ChlineSaurus commented on PR #2661:
URL: https://github.com/apache/jackrabbit-oak/pull/2661#issuecomment-3656419880
Small detail: In the future we maybe could use a retry mechanism of the
assertion, such that only if it fails it takes longer. In my old team we often
used something like:
```
private static void retryAssertionWithTimeout(
Runnable assertion, long intervalInMs, long hardTimeoutInMs) {
long startTime = System.currentTimeMillis();
while (System.currentTimeMillis() - startTime < hardTimeoutInMs) {
try {
assertion.run();
return;
} catch (AssertionError e) {
waitInMs(intervalInMs);
}
}
fail("Condition not met within timeout.");
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]