Writing tests for jcstress

The Java Concurrency Stress test is a wonderful tool that is used by JDK authors to ensure that their concurrent code works correctly with regards to concurrency. Concurrent code is hard to write and even harder to test. Most of their tests are probabilistic, require a lot of skill to write, and might take many days running time and the appropriate hardware to exhibit the fail behavior. Considering all this complexity, having a framework that can help with correct test execution is a big advantage. This recipe will go through the steps that are required to write your own tests for jcstress.

Getting ready

To follow this recipe, the only requirement is to have an environment that is capable of compiling and running jcstress ...

Get OpenJDK Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.