资 源 简 介
Testing of concurrent applications is definitely not easy. The way most teams test multithreaded applications are as follows:
Test the functionality of the application with a single user (i.e. single-thread, or at least in an environment whereby concurrency issues are not exercised).
Test the functionality with many threads. This usually occurs as part of load /stress testing. Many threads or virtual users are created to use the application concurrently.
It is in the second test when concurrency issues are exercised, but not completely. There are several reasons for this. The goal of such load/stress tests is to determine how much workload the system can withstand, and to tune the allocation of system resources and other execution parameters. The goal is not to test for concurrency problems. In fact, these tests assume that there are no concurrency problems in the first place.
In addition, such tests are conducted in a probabilistic man