Unit testing concurrent software - what do you do?

后端 未结 6 949
北荒
北荒 2020-12-31 09:37

As software gets more and more concurrent, how do you handle testing the core behaviour of the type with your unit tests (not the parallel behaviour, just the core

6条回答
  •  耶瑟儿~
    2020-12-31 09:53

    A technique I've found useful is to run tests within a tool that detects race conditions like Intel Parallel Inspector. The test runs much slower than normal, because dependencies on timing have to be checked, but a single run can find bugs that otherwise would require millions of repeated ordinary runs.

    I've found this very useful when converting existing systems for fine-grained parallelism via multi-core.

提交回复
热议问题