@@ -85,7 +85,8 @@ Race conditions
8585 ` putAll() ` under the lock?] ( #synchronized-collection-iter )
8686
8787Testing
88- - [ Considered adding multi-threaded unit tests for a thread-safe classes?] ( #multi-threaded-tests )
88+ - [ Considered adding multi-threaded unit tests for a thread-safe class or method?
89+ ] ( #multi-threaded-tests )
8990 - [ What is the worst thing that might happen if the code has a concurrency bug?
9091 ] ( #multi-threaded-tests )
9192 - [ A shared ` Random ` instance is * not* used from concurrent test workers?] ( #concurrent-test-random )
@@ -747,12 +748,12 @@ collections.
747748
748749<a name =" multi-threaded-tests " ></a >
749750[ #] ( #multi-threaded-tests ) T.1. ** Was it considered to add multi-threaded unit tests for a
750- thread-safe classes ?** Single-threaded tests don't really test the thread safety and concurrency.
751- Note that this question doesn't mean to indicate that there * must* be concurrent unit tests for
752- every piece of concurrent code in the project because correct concurrent tests take a lot of effort
753- to write and therefore they might often have low ROI.
751+ thread-safe class or method ?** Single-threaded tests don't really test the thread safety and
752+ concurrency. Note that this question doesn't mean to indicate that there * must* be concurrent unit
753+ tests for every piece of concurrent code in the project because correct concurrent tests take a lot
754+ of effort to write and therefore they might often have low ROI.
754755
755- ** What is the worst thing that might happen if this code has a concurrency bug?** is a useful
756+ ** What is the worst thing that might happen if this code has a concurrency bug?** This is a useful
756757question to inform the decision about writing concurrent tests. The consequences may range from a
757758tiny, entirely undetectable memory leak, to storing corrupted data in a durable database or
758759a security breach.
0 commit comments