Awaitility Changelog

What's new in Awaitility 4.0.3

May 19, 2020
  • Upgraded to Scala 2.13.2 from 2.13.0 (thanks to sullis for pull request)
  • Upgraded Kotlin extension to use Kotlin 1.3.72 (instead of 1.3.61)
  • Improved org.awaitility.core.ConditionEvaluationLogger to accept a consumer that decides how the logs are printed. You can use this to for example log intermediary values using slf4j instead of System.out.println or log to to disk or a data structure such as CopyOnWriteArrayList. For example:
  • await().conditionEvaluationListener(new ConditionEvaluationLogger(log::info)).until(<some condition>);
  • This will log using a the logger "log" instead of printing to the console.
  • Fixed problems with test dependencies in pom.xml
  • Upgraded Groovy from 2.5.7 to 3.0.3

New in Awaitility 4.0.2 (Jan 3, 2020)

  • Improved formatting of elapsed time (or error and logging) for long time durations
  • Implemented support for "during" (issue 124) (big thanks to Pablo Díaz-López for pull request)
  • Org.awaitility.core.ConditionEvaluationListener now has two additional hooks, "beforeEvaluation" and "onTimeout", which you can implement to get notified on these events. They are implemented as default methods to retain backward compatibility. (issue 149) (big thanks to Oliver Grof for pull request)
  • Upgraded Kotlin extension to use Kotlin 1.3.61 (instead of 1.3.50)
  • Added "handleIgnoredException" to org.awaitility.core.ConditionEvaluationListener. This is a hook that let's you react to ignored exceptions caught when evaluating a condition (thanks to Oliver Grof for pull request)
  • Avoid hiding exceptions on the same thread (issue 152) (thanks to Oliver Grof for pull request)
  • Fixed condition timeout calculation units (issue 148) (thanks to Anthony Baker for pull request)

New in Awaitility 4.0.1 (Sep 6, 2019)

  • Removed the dependency to objenesis since it's no longer required after the move to Java 8+
  • Fixed so that calculation of condition evaluation duration cannot be negative (thanks to Anders Asplund for pull request)

New in Awaitility 4.0.0 (Sep 2, 2019)

  • Added support for Adder's. For example: await().untilAdder(myLongAdder, equalTo(5L))
  • Added support for Accumulators's. For example: await().untilAccumulator(myLongAccumulator, equalTo(5L))
  • Better handling of InterruptedException for Future's by using code from Guava (code from Uninterruptibles)
  • Shutting down cleanup ExecutorService in an uninterruptible fashion
  • Upgraded Kotlin extension to use Kotlin 1.3.50 (instead of 1.3.41)

New in Awaitility 3.1.6 (Jan 25, 2019)

  • The Kotlin extension function called "has" is now null safe
  • The Kotlin extension function called "has" now accepts non-null types
  • Upgraded Kotlin extension to use Kotlin 1.3.11 (instead of 1.2.50)

New in Awaitility 3.1.5 (Dec 7, 2018)

  • Improved error message for "untilNotNull" Kotlin extension function
  • Added "untilNull" extension function to the Kotlin DSL: await untilNull

New in Awaitility 3.1.4 (Dec 5, 2018)

  • Added "untilNotNull" extension function to the Kotlin DSL: val data = await untilNotNull { myDataRepository.findById("id") }

New in Awaitility 3.1.2 (Jul 24, 2018)

  • Added "alias" method to awaitility which allows one to set the alias using a more english-like DSL: await().with().alias("my alias"). ..
  • Added several new Kotlin extension methods.
  • All extension functions can be imported from the "org.awaitility.kotlin" package (e.g. 'import org.awaitility.kotlin.*')

New in Awaitility 3.1.1 (Jul 24, 2018)

  • Hamcrest condition evaluation should be safer if called from multiple threads
  • Fixed bug where error message showed in Hamcrest condition could be the same as the expected value when conditional evaluation time exceeded at most time (issue 109).
  • Added org.awaitility.core.ConditionFactory.until(java.util.concurrent.Callable<T>, org.awaitility.core.Predicate<? super T>) that allows you to use a predicate to evaluate a condition like this: await().until(myRepository::count, cnt -> cnt == 2);
  • Added Kotlin module.

New in Awaitility 3.1.0 (Mar 14, 2018)

  • Bumped all identified out of data properties, some of which applied to dependencies, and bumped all plugin versions, tests are all passing (thanks to Andy Glick for pull request)
  • Fixed issue with ConditionAwaiter calculating a negative condition duration (and thus raised an IllegalArgumentException) in cases where System.currentTimeMillis returned a non-monotonic value (issue 95)
  • Throw TimeoutException from executing long-running Callables as ConditionTimeoutException (thanks to James Withers for pull request) (issue 97)
  • Updated Objenesis dependency from 2.5.1 to 2.6.0 (issue 104)
  • Use wall-clock agnostic System.nanoTime instead of System.currentTimeMillis internally (thanks to Ben Barnard for pull request)
  • Improved error messages for assertion conditions when using aliases. Previously aliases could be included twice in the ConditionTimeoutException which obscured the error message somewhat (issue 108).
  • Fixed so that Awaitility doesn't stop working when using custom threading with multiple conditions. This also greatly improves use cases where one supplies a custom ExecutorService to Awaitility.
  • It'll no longer be shutdown after each call to Awaitility. It's up to you as a user to shutdown the ExecutorService that you provide to Awaitility (issue 101).

New in Awaitility 1.6.1 (Jul 3, 2014)

  • Added support for condition evaluation listeners. A listener is called each time a Hamcrest-based condition has been evaluated by Awaitility.
  • Added primitive values to matching check when doing await().untilTrue(..) and await().untilFalse(..) (issue 26)
  • Fixed issue that caused poll interval to be used as poll delay (issue 29).

New in Awaitility 1.6.0 (Jul 3, 2014)

  • Support for using Fest Assert and AssertJ: await().until(() -> assertThat(fakeRepository.getValue()).isEqualTo(1));
  • Better Java 8 support
  • Updated Groovy module to use Groovy 2.2.2
  • Updated CgLib to version 3.1

New in Awaitility 1.3.2 (May 17, 2011)

  • Fixed an issue where poll interval overrode the poll delay.
  • Awaitility now throws IllegalStateException when timeout is less than or equal to the poll interval or poll delay.
  • Improved error messages when using field suppliers (e.g. await().until( fieldIn(object).ofType(int.class), is(2) );) when timeout occurs.