Repository navigation
chore(deps): update dependency org.awaitility:awaitility to v4.4.0 - #2734
Merged
Merged
Conversation
renovate
Bot
requested review from
dhoard,
fstab and
zeitlinger
as code owners
November 27, 2026 11:55
renovate
Bot
force-pushed
the
renovate/awaitility.version
branch
from
November 27, 2026 12:04
8841b19 to
96239a4
Compare
zeitlinger
approved these changes
Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
4.3.0→4.4.0Release Notes
awaitility/awaitility (org.awaitility:awaitility)
v4.4.0Added an Automatic-Module-Name to the jar manifests, which changes the module names for module-path users:
awaitility -> org.awaitility
awaitility.kotlin -> org.awaitility.kotlin
awaitility.scala -> org.awaitility.scala
awaitility.groovy -> org.awaitility.groovy
(issue 205, thanks to Piotr P. Karwasz for the original pull request).
awaitility-groovy can now be used on the module path. Its Groovy extension module descriptor moved from META-INF/services to META-INF/groovy, where Groovy 2.5 and later look for it, because the module system rejected the old file.
Added failFast to the Kotlin DSL (issue 206). For example:
await atMost Duration.ofMinutes(1) failFast { workflow.phase == "Failed" } until { workflow.phase == "Done" }
Also available are failFastWithReason("reason") { .. } and failFastAsserted { .. } (with an optional reason).
Added Awaitility.getDefaultTimeout(), getDefaultPollInterval() and getDefaultPollDelay() that return the current defaults. getDefaultPollDelay() returns null when no default poll delay is set, and setDefaultPollDelay(Duration) now accepts null to go back to that, so you can save and restore all three (issue 269, thanks to Alexander Schmidt for the original pull request).
Awaitility's internal polling executor is now a plain ThreadPoolExecutor instead of Executors.newSingleThreadExecutor(..), so each await statement no longer creates the finalizable wrapper that newSingleThreadExecutor adds (a cleaner registration from Java 21). On Java 8 ThreadPoolExecutor itself has a finalizer, so the saving there is one finalizable object instead of two (issue 168). Executors passed in by users and the existing InternalExecutorServiceFactory.create(..) methods are unchanged.
fieldIn(..) no longer relies on the compiler's synthetic this$0 field to build its timeout message (issue 223).
Upgraded assertj-core to 3.27.7 (thanks to Ian Hundere for pull request).
Updated the README example to use the Duration overload in await().atMost(..) (thanks to Kurt Alfred Kluever for pull request).
Added support for configuring the default timeout, poll interval and poll delay using ISO-8601 system properties. For example:
-Dawaitility.defaultTimeout=PT5S -Dawaitility.defaultPollInterval=PT0.1S -Dawaitility.defaultPollDelay=PT0.2S
(thanks to Henning Hoefer for pull request).
Clarified fail-fast documentation so that it correctly states that terminal failure happens when the fail-fast condition evaluates to true, and cleaned up related Javadocs (thanks to Mustafa Ulu for pull request).
Added failFastWithReason(Supplier, Callable) and failFastWithReason(Supplier, ThrowingRunnable) so that the fail-fast failure reason is created only when the fail-fast condition triggers, and can include the current state (issue 240). For example:
await().failFastWithReason(() -> "Order failed, last known state: " + order.state(), () -> order.state() == FAILED).until(() -> order.state() == SHIPPED);
If the supplier throws, the TerminalFailureException is still thrown and the supplier's exception is added to it as a suppressed exception.
Added untilThrown(..) and untilThrownExactly(..) that wait until some code throws an exception of a given type and return that exception (issue 129). For example:
IOException e = await().atMost(5, SECONDS).untilThrown(() -> client.fetch("/status"), IOException.class);
untilThrown also matches subclasses, untilThrownExactly only the exact class. Both take a Callable or a ThrowingRunnable. If the code returns normally Awaitility keeps polling, and any other exception fails the wait right away unless it's ignored with e.g. ignoreException(..). A method reference to an overloaded method is ambiguous here, so use a lambda for those. The Kotlin DSL has "await.untilThrown { client.fetch("/status") }" and untilThrownExactly.
Added timeoutMessage(Supplier) to the DSL. The supplier is only called if the await times out, and its text is appended on a new line after the standard timeout message, so the alias and the mismatch description are kept. For example:
await().atMost(5, SECONDS)
.timeoutMessage(() -> "Order state was " + orders.stateOf(orderId))
.until(() -> orders.stateOf(orderId) == SHIPPED);
Kotlin users can write "await withTimeoutMessage { .. } until { .. }" (pull request 195, thanks to James Agnew for the original pull request).
Added ConditionFactory#onTimeout(..) that takes a callback which is called once when the await times out, just before the ConditionTimeoutException is thrown. Use it to print extra diagnostics when a test is about to fail. For example:
await().atMost(10, SECONDS).onTimeout(event -> env.printErrors()).until(..);
The callback receives the TimeoutEvent and is called in the same cases as ConditionEvaluationListener#onTimeout (a timeout or an atLeast violation), not when the condition throws or a fail-fast condition fails. It is kept when conditionEvaluationListener(..) or logging(..) is called afterwards. If the callback throws, its exception is added as suppressed to the ConditionTimeoutException. The callback is still called if a listener's onTimeout throws. Also available in the Kotlin DSL as "await atMost 10.seconds onTimeout { .. } until { .. }" (issue 283, thanks to Burak KALAYCI for pull request).
during(..) can now succeed with the default timeout (issues 91, 165, 186 and 264). If you don't set atMost yourself, the default timeout is extended by the during period, so await().during(10, SECONDS).until(..) now works with the default 10 second timeout. If you do set atMost and it is not larger than the poll delay plus the during period, the await now fails at once with a ConditionTimeoutException that explains why, instead of polling until the timeout. When the condition is fulfilled at the timeout but has not held for the whole during period, the error message now says so (thanks to arimu1 for the timeout message work in pull request 309).
Added untilOrTimeout(..) and untilAssertedOrTimeout(..) that return an AwaitResult instead of throwing ConditionTimeoutException when the condition is not fulfilled in time. Other exceptions, such as fail fast failures, are still thrown. For example:
AwaitResult result = await().atMost(Duration.ofSeconds(2)).untilOrTimeout(repository::count, is(greaterThan(2)));
if (!result.isSuccess()) {
log.warn("Got {} items: {}", result.getValue(), result.getCause().getMessage());
}
Kotlin users can write "await atMost 2.seconds untilOrTimeout { repository.count() > 2 }" (issue 48, thanks to Jonatan Ivanov for the design).
fieldIn(..) error messages now work for fields declared in a superclass. Before, the timeout message said "Internal error" (issue 247, thanks to Jaya Dileep for pull request).
JavaVersionDetector now reads the major version from java.version strings like "25+36" and "25+36-ea" instead of throwing (issue 296, thanks to arimu1 for pull request).
Clarified in the Javadoc that during(..) needs the condition to hold continuously, not for a total of that time (issue 298, thanks to Jaya Dileep for pull request).
When an await times out while a condition evaluation is still running, ConditionTimeoutException.getCause() is now the assertion error from the previous evaluation, if that evaluation failed with one, instead of a java.util.concurrent.TimeoutException. If you check getCause() for a TimeoutException in this case, you need to update that check (issue 286, thanks to DragonFSKY for pull request).
Upgraded maven-jar-plugin from 2.4 to 3.5.1 and maven-help-plugin from 2.2 to 3.5.1. Building Awaitility now needs Maven 3.6.3 or later.
Added ExponentialBackoffPollInterval, a poll interval that doubles from a start duration up to a maximum (issue 300, thanks to Jaehong Park for pull request). For example:
await().pollInterval(exponential(Duration.ofMillis(500), Duration.ofSeconds(5))).until(..);
gives poll intervals of 500ms, 1s, 2s, 4s, 5s, 5s, and so on.
Fixed an int overflow in FibonacciPollInterval from poll 47 onwards. Very long Fibonacci poll intervals are now capped at the longest duration Awaitility supports instead of throwing an exception (issue 319, thanks to xh123637 for pull request).
Timeout messages no longer show day-scale durations as months, and use singular units such as "1 second" instead of "1 seconds". Fields are now separated by a single space ("1 minute 30 seconds" instead of "1 minutes 30 seconds"). If you assert on these messages you may need to update your expectations (issue 318, thanks to Shreya Roy Koneri for pull request).
The Java 8 test module is built and run in CI again (issue 156).
Timeout messages on JDK 15 and later say "Condition defined as a lambda expression in ..." again instead of "... a Lambda expression in ...".
Added StartEvaluationEvent.getPollDelay(), so a ConditionEvaluationListener can see the poll delay of the await before the first evaluation (issue 278, thanks to barthollomew for pull request).
forever() no longer drops an atLeast(..) or during(..) set earlier in the chain, so await().atLeast(1, SECONDS).forever() still fails if the condition is fulfilled too early (thanks to Jaehong Park for pull request).
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.