[concurrency-interest] unit testing concurrency code.

Brian Goetz brian at quiotix.com
Tue Sep 6 14:42:35 EDT 2005

Like the old joke about how porcupines mate -- very carefully.

Testing concurrent code is an extension of testing regular code.  First, 
you must have good tests for functionality, and be able to test as many 
of your classes invariants as possible.  The trick is then trying to 
generate as many random interleavings of operations as you can, without 
the test framework introducing timing artifacts that will prevent 
certain interleavings from being tested.

Our book, Java Concurrency in Practice, due out by the end of the year, 
will cover some of this.

Peter Veentjer - Anchor Men wrote:
> How do you (unit) tests concurrency code? I'm experienced
> with JUnit, but I haven't found a good extension for junit.
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at altair.cs.oswego.edu
> http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest

More information about the Concurrency-interest mailing list