Condo, The Conditional Event Pump for Java.
This is a small library providing a configurable, deterministic event pump. It allows you to build processes that can be orchestrated inside of tests for things to happen in a particular order, greatly helping make complex integration tests deterministic.
With condo every action is described with metadata. This can be anything that you can match a predicate against, but the simplest case is a string as showcased in ThreadedApplicationTest.
For even more detailed use-cases, read the JavaDoc in the Condo class or checkout the test cases
Any interfaces annotated with @AutoCondo
will cause a <name>_Condo
class
and <name>Metadata
interface to be generated.
These are implementations that are intended to wrap the annotated interfaces to provide a condo-based implementation.
To activate the annotation processor, add a dependency to condo-processor
.
<dependencies>
<dependency>
<groupId>eu.toolchain.condo</groupId>
<artifactId>condo-processor</artifactId>
<version>${condo.version}</version>
</dependency>
</dependencies>
For examples on how to use it, see condo-examples