Feed your junit tests with rohypnol and reveal race conditions!
The idea is to use a Java-agent to insert randomized pauses into your code. This should reveal race-conditions.
Start your JVM with -javaagent:<path>/rohypnol-1.0-SNAPSHOT-allinone.jar
Currently hard-coded. It instruments only classes starting with com.hazelcast
and parameters are in Constants
- Configurable strategy to select classes & methods to instrument.
- Configurable {White/Black}list to feed the pill to selected threads only.
- Multiple strategies to generate sleep duration. Currently it always uses uniform distribution.
@Holmistr came-up with the idea. Implementation bugs are mine.