Testing concurrency applications is a hard task. The threads of your application run on your computer without any guarantee of their execution order (except the synchronization mechanisms that you have included), so it's very difficult (impossible most of the time) to test all the circumstances that can occur. You can have errors impossible to reproduce because it only happens under rare or unique circumstances, or errors that happen on one machine but not on others due to the number of cores within the CPU. To detect and reproduce this situation, you can use different tools:
- Debug: You can use a debugger to debug the application. This process will be very tedious if you have only a few threads in the application and you have to go step by step in every thread. You can configure Eclipse or NetBeans to test concurrent applications.
- MultithreadedTC...