Testing Multithreaded Code

JMock provides a number of APIs to work with multi-threaded code, which let you:

  1. Unit test an object that executes concurrent tasks1
  2. Unit test an object that schedules tasks2
  3. Use JMock with multithreaded code3
  4. Synchronise with threads started by the code under test4
  5. Stress-test synchronisation code5

Links:

1. Unit test an object that executes concurrent tasks: http://www.jmock.org/threading-executor.html

2. Unit test an object that schedules tasks: http://www.jmock.org/threading-scheduler.html

3. Use JMock with multithreaded code: http://www.jmock.org/threading-synchroniser.html

4. Synchronise with threads started by the code under test: http://www.jmock.org/threading-waiting.html

5. Stress-test synchronisation code: http://www.jmock.org/threading-blitzer.html