[SERVER-51821] Always join threads in SharedFuture tests Created: 23/Oct/20 Updated: 29/Oct/23 Resolved: 24/Nov/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.9.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Amirsaman Memaripour | Assignee: | Billy Donahue |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | servicearch-wfbf-day | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Sprint: | Service arch 2020-11-30 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 23 | ||||||||
| Description |
|
Some of the unit-tests for SharedFuture (e.g., ConcurrentTest_ManySharedFutures) create a number of worker threads to test the behavior of futures in presence of concurrency. An attempt to delete these threads before they are joined (e.g., due to an exception) would cause the termination of the unit-test process (i.e., invocation of std::terminate). To prevent the termination and ensure the real cause of failure remains always visible, we must ensure all worker threads are joined before they go out-of-scope. |
| Comments |
| Comment by Billy Donahue [ 24/Nov/20 ] |
|
Fixed by same commit as |
| Comment by Billy Donahue [ 24/Nov/20 ] |
|
This fix is going to draft on |
| Comment by Billy Donahue [ 19/Nov/20 ] |
|
It's not really supported to ASSERT_EQ from a unit test thread other than the main thread. |