# awaitility **Repository Path**: zhjx2015/awaitility ## Basic Information - **Project Name**: awaitility - **Description**: 是一个 Java 库,它提供了简洁的 API 来等待异步操作完成或直到某个条件成立。与传统的 synchronized 或 Thread.sleep() 方法相比, Awaitility 可以让你更加精确地控制等待的行为。 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-11-26 - **Last Updated**: 2024-11-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ![Awaitility](resources/Awaitility_logo_red_small.png) [![Build Status](https://github.com/awaitility/awaitility/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/awaitility/awaitility/actions/workflows/ci.yml) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.awaitility/awaitility/badge.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A"org.awaitility"%20AND%20a%3A"awaitility") Testing asynchronous systems is hard. Not only does it require handling threads, timeouts, and concurrency issues, but the intent of the test code can be obscured by all these details. Awaitility is a DSL that allows you to express expectations of an asynchronous system in a concise and easy-to-read manner. For example: ```java @Test public void updatesCustomerStatus() { // Publish an asynchronous message to a broker (e.g. RabbitMQ): messageBroker.publishMessage(updateCustomerStatusMessage); // Awaitility lets you wait until the asynchronous operation completes: await().atMost(5, SECONDS).until(customerStatusIsUpdated()); ... } ``` ## News * 2024-08-07: Awaitility `4.2.2` is released with support for "ea" JVM versions. See [changelog](https://raw.githubusercontent.com/awaitility/awaitility/master/changelog.txt) for details. * 2024-03-15: Awaitility `4.2.1` is released. It allows for easier use of logging and some bug fixes and improvements. See [changelog](https://raw.githubusercontent.com/awaitility/awaitility/master/changelog.txt) for details. * 2022-03-04: Awaitility `4.2.0` is released. It allows the use of assertion libraries such as Hamcrest or Assertj in [fail-fast conditions](https://github.com/awaitility/awaitility/wiki/Usage#fail-fast-conditions) as well as various improvements and bug fixes. See [changelog](https://raw.githubusercontent.com/awaitility/awaitility/master/changelog.txt) for details. [Older news](https://github.com/awaitility/awaitility/wiki/OldNews) ## Documentation * [Getting started](https://github.com/awaitility/awaitility/wiki/Getting_started) * [Usage Guide](https://github.com/awaitility/awaitility/wiki/Usage) * [Awaitility Javadoc](http://www.javadoc.io/doc/org.awaitility/awaitility/4.2.2) ## Links * [Change log](https://github.com/awaitility/awaitility/raw/master/changelog.txt) * Awaitility on [Open Hub](https://www.openhub.net/p/awaitility) * [Mailing list](http://groups.google.com/group/awaitility) for questions and support Buy Me A Coffee