In Awaitility, how can I perform a post-action if a condition I'm waiting for fails? For example, collecting additional information, do some logging, or throwing an exception?
The only way I've found is to use a try-catch:
try {
Awaitility.await().until(myCondition)
} catch (Exception ex) {
// post actions
}
Is there a more Awaitility-like way of doing this?
You can use a condition evaluation listener: